https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61051
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |tree-optimization
Status|WAITING |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |10.0
Keywords| |missed-optimization
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk:
x.0_4 = x;
if (_3 != x.0_4)
goto <bb 5>; [66.00%]
else
goto <bb 4>; [34.00%]
<bb 4> [local count: 195204118]:
<bb 5> [local count: 574129753]:
# prephitmp_24 = PHI <1(3), 2(4)>
r.1_5 = r;
pretmp_26 = d;
if (r.1_5 > 0)
goto <bb 6>; [59.00%]
else
goto <bb 7>; [41.00%]
<bb 6> [local count: 338736556]:
f_18 = pretmp_26 + 1;
<bb 7> [local count: 574129754]:
# f_9 = PHI <f_18(6), pretmp_26(5)>
I think it has been fixed in since at least GCC 10 even.