https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110919
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-08-06 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Note I think what EVRP produces for some thing makes it harder to optimize too. EVRP does: Folding statement: _23 = _4 != 1; Folded into: _23 = (_Bool) _3; And at the end we get: _19 = _6 == iftmp.1_8; _3 = iftmp.1_8 ^ 1; _21 = (_Bool) _3; _23 = _6 != 0; _10 = _19 & _23; _5 = _10 & _21; Which is basically: (a == b) & (a == 0) & (b != 0)