https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85989
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- for (b_P5 = 0; b_P5 < 8; b_P5++) { P26 = P29; P29 = -(int)*P5; } for (b_P5 = 0; b_P5 < 3; b_P5++) { for (P29 = 0; P29 < 9; P29++) { i0 = P26; if (P26 < 0) { i0 = 0; so the sign of P29 does matter since it flows backwards into P26 -- possibly exactly the issue that causes the bug. The PHIs look like <bb 5> [local count: 286363364]: _3 = *P5_32(D); _4 = (int) _3; P29_36 = -_4; b_P5_37 = b_P5_20 + 1; <bb 6> [local count: 322154758]: # b_P5_20 = PHI <b_P5_37(5), 0(16)> # P26_22 = PHI <P29_23(5), 10(16)> # P29_23 = PHI <P29_36(5), 10(16)> if (b_P5_20 <= 7) goto <bb 5>; [88.89%] else goto <bb 14>; [11.11%] and you can see that parallel assignment to P29_23 and to P23_22 from P29_23 while backprop seems to evaluate PHIs in isolation, eventually losing that P26_22 = P29_23 copy? This looks hard to fix btw... process_block needs to be refactored to process all vars from PHI defs in parallel. Richard?