https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107772
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Severity|normal |enhancement Status|UNCONFIRMED |NEW Last reconfirmed| |2022-11-20 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, though this is more than just the your normal shrink wrapping case as you need to split the loop into two. Though maybe having the prologue and epoligue around the function call instead might be better .... Anyways this is still a more complex case for shrink wrapping. I Noticed that LLVM does not even do a shrink wrapping for the early return if b == e on entering the function.