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

            Bug ID: 110111
           Summary: bool patterns that should produce a?b:c
           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 f(bool a, bool b, bool c)
{
        if (a)  return b;
        return c;
}
bool f1(bool a, bool b, bool c)
{
        return a & b | (!a & c);
}
bool f2(bool a, bool b, bool c)
{
        return a & b | (a < c);
}
```
All 3 should produce the same code.

Reply via email to