]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120357 - ICE with early break vectorization
authorRichard Biener <rguenther@suse.de>
Fri, 30 May 2025 12:11:47 +0000 (14:11 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 6 Jun 2025 07:53:24 +0000 (09:53 +0200)
commit8cb0127dfd3d01d4549f3139b087d1a5966844ee
treee2dd4e39a0987c4866502efe05e4f50e84c89644
parent09884fa0f90da67915245622254cdfb947b87d37
tree-optimization/120357 - ICE with early break vectorization

When doing early break vectorization of a loop with a conditional
reduction the epilog creation code is confused as to before which exit
to insert the conditional reduction induction IV update.  The
following make sure this is done before the main IV exit.

PR tree-optimization/120357
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Create
the conditional reduction induction IV increment before the
main IV exit.

* gcc.dg/vect/vect-early-break_136-pr120357.c: New testcase.

(cherry picked from commit dce4da51ab66c3abb84448326910cd42f6fe2499)
gcc/testsuite/gcc.dg/vect/vect-early-break_136-pr120357.c [new file with mode: 0644]
gcc/tree-vect-loop.cc