https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123152

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Victor Do Nascimento
<[email protected]>:

https://gcc.gnu.org/g:57acdcf3fb3ec8915142e85a35dc88a0f4ec5d68

commit r16-6306-g57acdcf3fb3ec8915142e85a35dc88a0f4ec5d68
Author: Victor Do Nascimento <[email protected]>
Date:   Wed Dec 17 15:42:59 2025 +0000

    vect: Fix dominator update [PR123152]

    The `recompute_dominator' function used in the code fragment within
    this patch assumes correctness in the rest of the CFG. Consequently,
    it is wrong to rely upon it before the subsequent updates are made in
    the "Update dominators for multiple exits" loop in the function.

    Furthermore, if `loop_exit' == `scalar_exit', the "Update dominators for
    multiple exits" logic will already take care of updating the
    dominator for `scalar_exit->dest', such that the moved statement is
    unnecessary.

    gcc/ChangeLog:

            PR tree-optimization/123152
            * tree-vect-loop-manip.cc
            (slpeel_tree_duplicate_loop_to_edge_cfg): Correct order of
            dominator update.

    gcc/testsuite/ChangeLog:

            * gcc.dg/vect/vect-uncounted-prolog-peel_2.c: New.
            * gcc.dg/vect/vect-uncounted-prolog-peel_3.c: Likewise.
            * g++.dg/vect/vect-uncounted-prolog-peel_1.cc: Likewise.

Reply via email to