https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108482
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is just a latent bug exposed by Richi's copyprop improvement. Folding statement: ivtmp_37 = ivtmp_38 - 1; gimple_simplified to ivtmp_37 = 1; Folded into: ivtmp_37 = 1; Folding statement: if (ivtmp_37 != 0) Not folded While trunk (GCC 13): Folding statement: ivtmp_9 = ivtmp_39 - 1; Queued stmt for removal. Folds to: 1 Folding statement: if (ivtmp_9 != 0) gimple_simplified to if (1 != 0) Folded into: if (1 != 0) Which is the correct thing to do and removes an branch earlier. Which then removes a few extra loops. Except now LOOP_DIST_ALIAS is not conditionalizing two loops any more.