https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102681
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So in uninit1 we have: if (_6691 != 0) goto <bb 287>; [5.50%] else goto <bb 87>; [94.50%] <bb 287> [local count: 17344687]: goto <bb 88>; [100.00%] <bb 87> [local count: 298013267]: <bb 88> [local count: 315357954]: # const_upper_3854 = PHI <_6687(87), 18446744073709551615(287)> # _870 = PHI <1(87), 0(287)> (lots of stuff) .... if (_6691 != 0) goto <bb 101>; [5.50%] else goto <bb 293>; [94.50%] <bb 293> [local count: 298013268]: goto <bb 102>; [100.00%] <bb 101> [local count: 17344687]: <bb 102> [local count: 315357954]: # const_upper_3931 = PHI <const_upper_3934(D)(101), _6687(293)> if (_870 != 0) goto <bb 103>; [50.00%] else goto <bb 106>; [50.00%] <bb 103> [local count: 157678977]: if (const_upper_3931 > _6695) goto <bb 105>; [89.00%] else goto <bb 294>; [11.00%] But _870 is _6691 == 0 but that relationship is totally missed and there is full on jump threading miss in the above IR.