]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118269 - SLP reduction chain and early breaks
authorRichard Biener <rguenther@suse.de>
Tue, 7 Jan 2025 10:15:43 +0000 (11:15 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 8 Jan 2025 07:21:50 +0000 (08:21 +0100)
commit2dd4eb15b63ca1f20a637e8b26567d5064a43a4f
tree9b6961ead5b7adb14b84ed05535cb4345a1473bd
parent42b24557bdf805d2913d3c75531fe441b1634332
tree-optimization/118269 - SLP reduction chain and early breaks

When we create the SLP reduction chain epilogue for the PHIs for
the early exit we fail to properly classify the reduction as SLP
reduction chain.  The following fixes the corresponding checks.

PR tree-optimization/118269
* tree-vect-loop.cc (vect_create_epilog_for_reduction):
Use the correct stmt for the REDUC_GROUP_FIRST_ELEMENT lookup.

* gcc.dg/vect/vect-early-break_131-pr118269.c: New testcase.
gcc/testsuite/gcc.dg/vect/vect-early-break_131-pr118269.c [new file with mode: 0644]
gcc/tree-vect-loop.cc