https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42117
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|42195 | Status|ASSIGNED |NEW Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I am not going to fix this. But right now we get: _8 = x_5(D) | y_6(D); _4 = (unsigned int) _8; if (_4 <= 1) goto <bb 3>; [57.43%] else goto <bb 5>; [42.57%] <bb 3> [local count: 616649929]: if (x_5(D) != 0) goto <bb 4>; [50.00%] else goto <bb 5>; [50.00%] <bb 4> [local count: 126413234]: _9 = y_6(D) != 0; _1 = (int) _9; <bb 5> [local count: 1073741824]: # _3 = PHI <x_5(D)(3), _1(4), -1(2)> Part of the problem is realizing y_6 is [0,1] range when looking at _9/_1. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42195 [Bug 42195] missed xnor optimization.