]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120089 - force all PHIs live for early-break vect
authorRichard Biener <rguenther@suse.de>
Mon, 5 May 2025 12:29:34 +0000 (14:29 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 8 May 2025 06:36:53 +0000 (08:36 +0200)
commit9def392a1b63a198d15d972f73b4afc888389d7c
treeb88264bc7622226f12068a2e2a801c4ec4f716ad
parent9b13bea07706a7cae0185f8a860d67209308c050
tree-optimization/120089 - force all PHIs live for early-break vect

The following makes sure to even mark unsupported PHIs live when
doing early-break vectorization since otherwise we fail to validate
we can vectorize those and generate wrong code based on the scalar
PHIs which would only work with a vectorization factor of one.

PR tree-optimization/120089
* tree-vect-stmts.cc (vect_stmt_relevant_p): Mark all
PHIs live when not already so and doing early-break
vectorization.
(vect_mark_stmts_to_be_vectorized): Skip virtual PHIs.
* tree-vect-slp.cc (vect_analyze_slp): Robustify handling
of early-break forced IVs.

* gcc.dg/vect/vect-early-break_134-pr120089.c: New testcase.
gcc/testsuite/gcc.dg/vect/vect-early-break_134-pr120089.c [new file with mode: 0644]
gcc/tree-vect-slp.cc
gcc/tree-vect-stmts.cc