https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116126
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfch...@gcc.gnu.org>: https://gcc.gnu.org/g:f1c6789ab6c5443ccefab96c74b0e862119d1781 commit r15-6809-gf1c6789ab6c5443ccefab96c74b0e862119d1781 Author: Tamar Christina <tamar.christ...@arm.com> Date: Mon Jul 8 12:16:11 2024 +0100 vect: Fix dominators when adding a guard to skip the vector loop [PR118211] The alignment peeling changes exposed a latent missing dominator update with early break vectorization, specifically when inserting the vector skip edge, since the new edge bypasses the prolog skip block and thus has the potential to subvert its dominance. This patch fixes that. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-loop-manip.cc (vect_do_peeling): Update immediate dominators of nodes that were dominated by the prolog skip block after inserting vector skip edge. Initialize prolog variable to NULL to avoid bogus -Wmaybe-uninitialized during bootstrap. gcc/testsuite/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * g++.dg/vect/vect-early-break_6.cc: New test. Co-Authored-By: Alex Coplan <alex.cop...@arm.com>