]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/114068 - missed virtual LC PHI after vect peeling
authorRichard Biener <rguenther@suse.de>
Mon, 26 Feb 2024 10:25:50 +0000 (11:25 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 26 Feb 2024 14:20:54 +0000 (15:20 +0100)
commit8293df8019adfffae3384cb6fb9cb6f496fe8608
tree339e9d6308925da7f4dab83f5f4dad4753581550
parent146f16c97f632be88d6ed543d24887477682af6b
tree-optimization/114068 - missed virtual LC PHI after vect peeling

When we choose the IV exit to be one leading to no virtual use we
fail to have a virtual LC PHI even though we need it for the epilog
entry.  The following makes sure to create it so that later updating
works.

PR tree-optimization/114068
* tree-vect-loop-manip.cc (get_live_virtual_operand_on_edge):
New function.
(slpeel_tree_duplicate_loop_to_edge_cfg): Add a virtual LC PHI
on the main exit if needed.  Remove band-aid for the case
it was missing.

* gcc.dg/vect/vect-early-break_118-pr114068.c: New testcase.
* gcc.dg/vect/vect-early-break_119-pr114068.c: Likewise.
gcc/testsuite/gcc.dg/vect/vect-early-break_118-pr114068.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-early-break_119-pr114068.c [new file with mode: 0644]
gcc/tree-vect-loop-manip.cc