https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100034
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Version|unknown |11.0
Keywords| |missed-optimization
CC| |hubicka at gcc dot gnu.org
Last reconfirmed| |2021-04-12
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks related to PR99991 - we do an IPA SRA clone but fail to inline it and
thus we end up with
void d.isra ()
{
int D.1980;
int g.2_1;
<bb 2> [local count: 10631108]:
<bb 3> [local count: 96646437]:
g.2_1 = 0;
if (g.2_1 != 0)
goto <bb 3>; [89.00%]
else
goto <bb 4>; [11.00%]
<bb 4> [local count: 1073741824]:
foo ();
goto <bb 4>; [100.00%]
}
int main ()
{
int a.0_2;
int b.1_3;
<bb 2> [local count: 59461674]:
goto <bb 6>; [100.00%]
<bb 3> [local count: 1014686025]:
a.0_2 = a;
if (a.0_2 == 0)
goto <bb 4>; [99.96%]
else
goto <bb 5>; [0.04%]
<bb 4> [local count: 1014280151]:
// predicted unlikely by continue predictor.
goto <bb 6>; [100.00%]
<bb 5> [local count: 405874]:
d.isra ();
<bb 6> [local count: 1073741824]:
b.1_3 = b;
if (b.1_3 != 0)
goto <bb 3>; [94.50%]
else
goto <bb 7>; [5.50%]
<bb 7> [local count: 59055800]:
return 0;
}
where we optimize main to 'return 0' but fail to elide the unused d.isra.
So also a dup of the cases where a late IPA function reclaim is missing.