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

            Bug ID: 122849
           Summary: phiprop type check can be less restrictive
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int a;
int b;
int f(int e) {
  int *c = e ? &a : &b;
  unsigned *d = (unsigned *)c;
  return *c - *d;
}
```
This only gets optimized in phiprop2 because the type check is restrive to
types_compatible_p but really the restriction should be losened to allow nop
conversions too.

Reply via email to