https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110919
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The first change we get is threadfull1 where there is an extra jump threading. And then phiopt2 changes: <bb 3> [local count: 719407024]: if (l_15(D) != 0) goto <bb 6>; [50.00%] else goto <bb 7>; [50.00%] into: <bb 3> [local count: 719407024]: _17 = l_15(D) == 0; _36 = (int) _17; And then DOM2 does not do jump threading along: <bb 6> [local count: 628138968]: # iftmp.1_8 = PHI <_36(3), 0(5)> As I mentioned in comment #2 we don't see that: _19 = _6 == iftmp.1_8; _3 = iftmp.1_8 ^ 1; _21 = (_Bool) _3; _22 = _19 & _21; _23 = _6 != 0; _5 = _22 & _23; is always 0.