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

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

https://gcc.gnu.org/g:09ea2b042881a6fad24e9b96029b62b93eda4fea

commit r17-1614-g09ea2b042881a6fad24e9b96029b62b93eda4fea
Author: Tamar Christina <[email protected]>
Date:   Wed Jun 17 12:09:22 2026 +0100

    vect: Fix early break in PEELED cases [PR125804]

    When a loop is LOOP_VINFO_EARLY_BREAKS_VECT_PEELED && !
LOOP_VINFO_EARLY_BRK_NEEDS_EPILOG
    then we still need the epilog loop for the main latch edge.

    The early exits themselves when LOOP_VINFO_EARLY_BRK_NEEDS_EPILOG don't
need to
    go to scalar code.

    Allowing bound_epilog to still be set to VF when
    LOOP_VINFO_EARLY_BREAKS_VECT_PEELED we get to the desired effect that the
early
    exits do not require an epilog when !LOOP_VINFO_EARLY_BRK_NEEDS_EPILOG but
    the main edge still does if LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.

    gcc/ChangeLog:

            PR tree-optimization/125804
            * tree-vect-loop-manip.cc (vect_do_peeling): Have
            LOOP_VINFO_EARLY_BREAKS_VECT_PEELED require epilog.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/125804
            * gcc.dg/vect/vect-early-break_144-pr125804.c: New test.

Reply via email to