https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111282
Bug ID: 111282 Summary: `a & (b ^ ~a)` (or `a & ~(a ^ b)`) not optimized to `a & b` in gimple Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` int f(int a, int b) { return a & (b ^ ~a); } `` This should be optimized to `a & b` which it is on the RTL.