gnu/gcc/09ea2b042881a6fad24e9b96029b62b93eda4fea 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.
2 files changed