https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112098
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Last reconfirmed| |2023-10-26 Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Mine. The problem is more simplified than that. We recognize: `(A & C) != 0 ? D : 0` But not `(A & C) == 0 ? D : 0` Also the order of match causes issues for unsigned int foo_ (unsigned int x) { int t = x & 0x200; if (t) return 0x10; return 0; } /* A few simplifications of "a ? CST1 : CST2". */ And a few other issues too.