https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113364
--- Comment #17 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:72429448fd16733f876b282bb37a0653049c446d commit r14-8382-g72429448fd16733f876b282bb37a0653049c446d Author: Tamar Christina <tamar.christ...@arm.com> Date: Wed Jan 24 07:37:17 2024 +0000 middle-end: fix epilog reductions when vector iters peeled [PR113364] This fixes a bug where vect_create_epilog_for_reduction does not handle the case where all exits are early exits. In this case we should do like induction handling code does and not have a main exit. This shows that some new miscompiles are happening (stage3 is likely miscompiled) but that's unrelated to this patch and I'll look at it next. gcc/ChangeLog: PR tree-optimization/113364 * tree-vect-loop.cc (vect_create_epilog_for_reduction): If all exits all early exits then we must reduce from the first offset for all of them. gcc/testsuite/ChangeLog: PR tree-optimization/113364 * gcc.dg/vect/vect-early-break_107-pr113364.c: New test.