This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/71947] New: x ^ y not folded to 0 if x == y


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]