https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116874
Bug ID: 116874 Summary: phiprop should handle more than just `a->t` 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: --- Take: ``` struct Foo { int t; int x; }; int f(struct Foo a, struct Foo b, int c) { struct Foo d; struct Foo *l; if (c) l = &a; else l = &b; d = *l; return d.t + d.x; } ``` Right now phiprop only handles `MEM[x]` but it should handle more, e.g.: ``` # l_3 = PHI <&a(2), &b(3)> d$t_6 = MEM[(const struct Foo &)l_3].t; d$x_5 = MEM[(const struct Foo &)l_3].x; ``` I don't know how often this should up though.