https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:8293df8019adfffae3384cb6fb9cb6f496fe8608 commit r14-9181-g8293df8019adfffae3384cb6fb9cb6f496fe8608 Author: Richard Biener <rguent...@suse.de> Date: Mon Feb 26 11:25:50 2024 +0100 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.