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

            Bug ID: 112814
           Summary: `Plus <PHI <a,b>, PHI<b,a>>` is not optimized to just
                    PLUS<a,b>
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int f(int a, int b, int c)
{
        int d, e;
        if (c) d = a, e = b;
        else   d = b, e = a;
        return d+e;
}
```
This should just be optimized to `return a+b` but it is currently not.

Reply via email to