https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112440
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
One missed optimization is:
<bb 6> [local count: 58465242]:
if (summ_2(D) <= 29)
goto <bb 8>; [50.00%]
else
goto <bb 7>; [50.00%]
<bb 7> [local count: 29232621]:
_116 = summ_2(D) + 1;
<bb 8> [local count: 105237435]:
# _114 = PHI <_116(7), 31(6)>
# __new_capacity_75 = PHI <summ_2(D)(7), 30(6)>
that is:
__new_capacity_75 = Min<30, summ_2>;
_114 = __new_capacity_75 + 1;
unsigned f(unsigned a, unsigned &b)
{
unsigned c = a;
unsigned d = a+1;
if (a <= 29)
{
c = 30;
d = 31;
}
b = d;
return c;
}