https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111149
Bug ID: 111149 Summary: bool0 != bool1 should be convert into bool0 ^ bool1 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` _Bool k(_Bool a, _Bool b) { return a != b; } ``` This should be changed into: ``` _Bool k0(_Bool a, _Bool b) { return a ^ b; } ``` Note clange handles this. The main problem with this is with respect to having it inside GIMPLE_COND ...