aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-03-07 10:15:20 +0100
committerRichard Biener <rguenth@gcc.gnu.org>2025-03-07 12:16:48 +0100
commit7950d4cceb9fc7559b1343c95fc651cefbe287a0 (patch)
tree9130722522de7cc86c289584ea8357a4d14285e0 /gcc/tree-vectorizer.cc
parentb1d0ac28de643e7c810e407a0668737131cdcc00 (diff)
downloadgcc-7950d4cceb9fc7559b1343c95fc651cefbe287a0.zip
gcc-7950d4cceb9fc7559b1343c95fc651cefbe287a0.tar.gz
gcc-7950d4cceb9fc7559b1343c95fc651cefbe287a0.tar.bz2
tree-optimization/119145 - avoid stray .MASK_CALL after vectorization
When we BB vectorize an if-converted loop body we make sure to not leave around .MASK_LOAD or .MASK_STORE created by if-conversion but we failed to check for .MASK_CALL. PR tree-optimization/119145 * tree-vectorizer.cc (try_vectorize_loop_1): Avoid BB vectorizing an if-converted loop body when there's a .MASK_CALL in the loop body. * gcc.dg/vect/pr119145.c: New testcase.
Diffstat (limited to 'gcc/tree-vectorizer.cc')
-rw-r--r--gcc/tree-vectorizer.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
index f38c8d2..447f882 100644
--- a/gcc/tree-vectorizer.cc
+++ b/gcc/tree-vectorizer.cc
@@ -1132,7 +1132,9 @@ try_vectorize_loop_1 (hash_table<simduid_to_vf> *&simduid_to_vf_htab,
if (call && gimple_call_internal_p (call))
{
internal_fn ifn = gimple_call_internal_fn (call);
- if (ifn == IFN_MASK_LOAD || ifn == IFN_MASK_STORE
+ if (ifn == IFN_MASK_LOAD
+ || ifn == IFN_MASK_STORE
+ || ifn == IFN_MASK_CALL
/* Don't keep the if-converted parts when the ifn with
specifc type is not supported by the backend. */
|| (direct_internal_fn_p (ifn)