https://gcc.gnu.org/g:0faad9e4dfa5015c9535e4f2a40400914c5b4674
commit 0faad9e4dfa5015c9535e4f2a40400914c5b4674 Author: Richard Biener <rguent...@suse.de> Date: Tue Mar 5 15:46:24 2024 +0100 Allow single-lane SLP in-order reductions The single-lane case isn't different from non-SLP, no re-association implied. * tree-vect-loop.cc (vectorizable_reduction): Allow single-lane SLP in-order reductions. Diff: --- gcc/tree-vect-loop.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 8fb8800e6a7e..a5597ec1287b 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -8134,7 +8134,7 @@ vectorizable_reduction (loop_vec_info loop_vinfo, } if (reduction_type == FOLD_LEFT_REDUCTION - && slp_node + && (slp_node && SLP_TREE_LANES (slp_node) > 1) && !REDUC_GROUP_FIRST_ELEMENT (stmt_info)) { /* We cannot use in-order reductions in this case because there is