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

            Bug ID: 116821
           Summary: phiprop could be improved to handle PHI<&a, ssa_name>
           Product: gcc
           Version: 15.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: ---

Noticed while looking into PR 116819.
Take the following C++ code :
```
const unsigned &max_1(const unsigned &d,
                      const unsigned &e) {
  if (d < e)
    return e;
  return d;
}
unsigned g(unsigned *f) {
  return max_1(f[0], 70);
}
```

Where in phiopt1 we should to able to get a MAX_EXPR . But currently it is not
until phiopt4 we get one. Which might be too late for the vectorizer.

Reply via email to