https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71947
Bug ID: 71947 Summary: x ^ y not folded to 0 if x == y Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: prathamesh3492 at gcc dot gnu.org Target Milestone: --- Hi, For the following case: int f(int x, int y) { int ret; if (x == y) ret = x ^ y; else ret = 1; return ret; } x ^ y does not get folded to 0. From the discussion in: https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00385.html r233207 must have regressed this test-case. Thanks, Prathamesh