]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120211 - constrain LOOP_VINFO_EARLY_BREAKS_LIVE_IVS more
authorRichard Biener <rguenther@suse.de>
Sun, 11 May 2025 12:03:12 +0000 (14:03 +0200)
committerRichard Biener <rguenther@suse.de>
Sun, 11 May 2025 13:39:51 +0000 (15:39 +0200)
commit833db92d69cf371af3ade32e2a2b154c22e7ef15
tree6ec2bcff2ff4a850f745c1339bdd708ff5fcd3fc
parent004bf889e0b1b96ae50f93339104d3602a88deb5
tree-optimization/120211 - constrain LOOP_VINFO_EARLY_BREAKS_LIVE_IVS more

The PR120089 fix added more PHIs to LOOP_VINFO_EARLY_BREAKS_LIVE_IVS
but not checking that we only add PHIs with a latch argument.  The
following adds this missing check.

PR tree-optimization/120211
* tree-vect-stmts.cc (vect_stmt_relevant_p): Only add PHIs
from the loop header to LOOP_VINFO_EARLY_BREAKS_LIVE_IVS.

* gcc.dg/vect/vect-early-break_135-pr120211.c: New testcase.
* gcc.dg/torture/pr120211-1.c: Likewise.
gcc/testsuite/gcc.dg/torture/pr120211-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-early-break_135-pr120211.c [new file with mode: 0644]
gcc/tree-vect-stmts.cc