https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111950
--- Comment #11 from CVS 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:bf72d50d16f0c1fa8102ca2544d2a05772f8c273 commit r14-5155-gbf72d50d16f0c1fa8102ca2544d2a05772f8c273 Author: Richard Biener <rguent...@suse.de> Date: Fri Nov 3 14:24:10 2023 +0100 tree-optimization/111950 - vectorizer loop copying The following simplifies LC-PHI arg population during epilog peeling, thereby fixing the testcase in this PR. PR tree-optimization/111950 * tree-vect-loop-manip.cc (slpeel_duplicate_current_defs_from_edges): Remove. (find_guard_arg): Likewise. (slpeel_update_phi_nodes_for_guard2): Likewise. (slpeel_tree_duplicate_loop_to_edge_cfg): Remove calls to slpeel_duplicate_current_defs_from_edges, do not elide LC-PHIs for invariant values. (vect_do_peeling): Materialize PHI arguments for the edge around the epilog from the PHI defs of the main loop exit. * gcc.dg/torture/pr111950.c: New testcase.