https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123111
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Component|target |middle-end
Target|sh |sh x86_64
Last reconfirmed| |2025-12-13
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. The testcase is worse for x86_64 too.
Basically there is a missing ifconv due to the new forwarder block.
Before:
```
<bb 3> [local count: 616649927]:
if (_1 > res_6(D))
goto <bb 5>; [34.00%]
else
goto <bb 4>; [66.00%]
<bb 4> [local count: 406988950]:
<bb 5> [local count: 1073741824]:
# _3 = PHI <-5(2), -55(4), -5(3)>
```
Is expanded to have -5 on both edges.
Which meant ifconv worked.
But afterwards we have:
```
if (_2 > 1)
goto <bb 6>; [42.57%]
else
goto <bb 3>; [57.43%]
<bb 3> [local count: 616649927]:
if (_1 > res_6(D))
goto <bb 6>; [34.00%]
else
goto <bb 4>; [66.00%]
<bb 6> [local count: 457091895]:
// _5 = -5
goto <bb 5>; [100.00%]
<bb 4> [local count: 406988950]:
// _3 = -55
<bb 5> [local count: 1073741824]:
# _3 = PHI <-5(6), -55(4)>
```
And then ifconv does not handle this case.
I am not sure how to resolve this except to do some ifconv on the gimple level.
Which I think will have to wait till 17.