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

--- Comment #28 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 65105
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65105&action=edit
new testcase

With this testcase r16-4000-g9ee937b2f92a93 does not help. 

But maybe phiprop could be improved here to handle it.
in phiprop1 we have:
```
  # ap_5 = PHI <_24(4), _14(5)>
  _2 = ap_5->_vptr.A;
  _3 = *_2;
  OBJ_TYPE_REF(_3;(struct A)ap_5->0B) (ap_5);
```
I wonder if we could get that matching to get similar what pre does in the end:
```
  # ap_5 = PHI <_14(4), _10(5)>
  # prephitmp_7 = PHI <foo(4), foo(5)>
  OBJ_TYPE_REF(prephitmp_7;(struct A)ap_5->0B) (ap_5);
```
and then notice we have a call right after the phi and prop that back in.
And then we don't need tracer here and even would do inlining ...

Reply via email to