https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114832
--- Comment #4 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:e28e8ab1a92e9b49f7c4045377577c8dc17751b7 commit r14-10105-ge28e8ab1a92e9b49f7c4045377577c8dc17751b7 Author: Richard Biener <rguent...@suse.de> Date: Wed Apr 24 06:24:22 2024 +0200 tree-optimization/114832 - wrong dominator info with vect peeling When we update the dominator of the redirected exit after peeling we check whether the immediate dominator was the loop header rather than the exit source when we later want to just update it to the new source. The following fixes this oversight. PR tree-optimization/114832 * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): Fix dominance check. * gcc.dg/vect/pr114832.c: New testcase.