https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113026
--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 15 Dec 2023, avieira at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113026 > > --- Comment #4 from avieira at gcc dot gnu.org --- > Drive by comments as it's been a while since I looked at this. I'm also > surprised we didn't adjust the bounds. But why do we only subtract VF? Like > you > say, if there's no loop around edge, can't we guarantee the epilogue will only > need to iterate at most VF-1? This is assuming we didn't take an early exit, > if we do then we can't assume anything as the iterations 'reset'. Subtracting can bring down epilogue iterations max to 1 while yes, we should also apply a max of VF-1 but in addition to the subtraction.