]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] Fix SLP when ifcvt versioned loop is not vectorized
authorKugan Vivekanandarajah <kvivekananda@nvidia.com>
Wed, 30 Oct 2024 20:23:10 +0000 (07:23 +1100)
committerKugan Vivekanandarajah <kvivekananda@nvidia.com>
Wed, 30 Oct 2024 20:23:16 +0000 (07:23 +1100)
commitacba8b3d8dec0124c8b3a7e112b3a784a5091214
treec61a8c40f9bca86c66fff80e92ddd3dc6ad4a7d4
parent5be5c66071b407a767856b8fa300ede54fcf11b4
[PATCH] Fix SLP when ifcvt versioned loop is not vectorized

When ifcvt version a loop, it sets dont_vectorize to the scalar loop. If the
vector loop is not vectorized and removed, the scalar loop is still left with
dont_vectorize. As a result, BB vectorization will not happen.

This patch resets dont_vectorize to scalar loop when IFN_LOOP_VECTORIZED
is set to false.

gcc/ChangeLog:

* tree-vectorizer.cc (pass_vectorize::execute): Reset dont_vectorize
to scalar loop when setting IFN_LOOP_VECTORIZED to false.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/bb-slp-77.c: New test.
gcc/testsuite/gcc.dg/vect/bb-slp-77.c [new file with mode: 0644]
gcc/tree-vectorizer.cc