https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110922

            Bug ID: 110922
           Summary: `(a == b) & (a == c) & (b != c)` is not optimized to
                    false
           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: ---

I noticed this while looking at PR 110919:
```
int f(int a, int b)
{
  _Bool t = a == b;
  _Bool t1 = a == 0;
  _Bool t2 = b != 0;
  return t&t1&t2;
}
```
is not optimized to false.

Reply via email to