https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108466
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- phiopt changes from: ``` <bb 5> : [/app/example.cpp:10:12] // predicted unlikely by early return (on trees) predictor. [/app/example.cpp:10:12] goto <bb 7>; [INV] <bb 6> : [/app/example.cpp:12:12] _18 = (int) a_4; [/app/example.cpp:12:12] // predicted unlikely by early return (on trees) predictor. <bb 7> : # _5 = PHI <[/app/example.cpp:10:12] 0(5), [/app/example.cpp:12:12] _18(6)> ``` to: ``` [/app/example.cpp:9:3 discrim 1] if (_16 != 0) goto <bb 5>; [INV] else goto <bb 6>; [INV] <bb 5> : [/app/example.cpp:10:12] // predicted unlikely by early return (on trees) predictor. [/app/example.cpp:10:12] goto <bb 7>; [INV] <bb 6> : [/app/example.cpp:12:12] // predicted unlikely by early return (on trees) predictor. <bb 7> : # _17 = PHI <0(5), a_4(6)> _5 = (int) _17; ``` I think I can improve the location information on the phi, (5) should have the same as it was before. (6) should have where the cast was. The new cast in this case I think should be the same as it was. In the case where the cast is from both bb, we should see if they have the same location if so use that otherwise leave it blank. Let me try that but won't be until next week I think.