https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107838
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I think there's a duplicate bug, we fail to pick up the controlling condition because IVOPTs replaced the exit test but we still have i_19 = (int) ivtmp.4_6; if (i_19 == 0) ... <bb 7> [local count: 966367643]: ivtmp.4_21 = ivtmp.4_6 + 1; if (ivtmp.4_21 != 9) thus with -fno-ivopts the predication code works fine. It doesn't try hard enough to consider "derived" conditions like the above.