https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120425
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue starts when loop header copying unloops the loop, making the backedge path unreachable, retaining only the exit to the trap. But the earlier exit to 0 isn't happening. (instantiate_scev (instantiate_below = 2 -> 3) (evolution_loop = 1) (chrec = {-1991113005, +, 1316103130}_1) (res = {-1991113005, +, 1316103130}_1)) (record_nonwrapping_chrec: {-1991113005, +, 1316103130}<nw>_1) Induction variable (int) -1991113005 + 1316103130 * iteration does not wrap in statement f_8 = (int) _14; in loop 1. Statement f_8 = (int) _14; is executed at most 3 (bounded by 3) + 1 times in loop 1. Loop 1 never loops. so this is probably one of the known latent issues in SCEV with IVs that evolve in an "interesting" way, exploiting UB and with better ranges it's now easier to trigger.