aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-06-18 14:00:52 +0200
committerRichard Biener <rguenther@suse.de>2024-06-18 15:27:52 +0200
commit7f9be55a4630134a237219af9cc8143e02080380 (patch)
treea83abca1675b483bffba71ade332cf5b890c95b9 /gcc/tree-vect-loop.cc
parenta78e2c3a00d8b147b44416f7a843c9df61f04531 (diff)
downloadgcc-7f9be55a4630134a237219af9cc8143e02080380.zip
gcc-7f9be55a4630134a237219af9cc8143e02080380.tar.gz
gcc-7f9be55a4630134a237219af9cc8143e02080380.tar.bz2
tree-optimization/115537 - ICE with SLP condition reduction vectorization
The condition rejecting "multiple-type" SLP condition reduction lacks handling EXTRACT_LAST reductions. PR tree-optimization/115537 * tree-vect-loop.cc (vectorizable_reduction): Also reject SLP condition reductions of EXTRACT_LAST kind when multiple statement copies are involved. * gcc.dg/vect/pr115537.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
-rw-r--r--gcc/tree-vect-loop.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 7c79e9d..eeb75c0 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -8083,13 +8083,14 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
if ((reduction_type == COND_REDUCTION
|| reduction_type == INTEGER_INDUC_COND_REDUCTION
- || reduction_type == CONST_COND_REDUCTION)
+ || reduction_type == CONST_COND_REDUCTION
+ || reduction_type == EXTRACT_LAST_REDUCTION)
&& slp_node
&& SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) > 1)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "multiple types in condition reduction reduction.\n");
+ "multiple types in condition reduction.\n");
return false;
}