https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117935
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-12-06
Ever confirmed|0 |1
CC| |jason at gcc dot gnu.org
Status|UNCONFIRMED |NEW
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
The prediction is already gone in the einline dump, after inlining into
value_or. I expect the same hot label comment after <bb 3> but it's not there:
int optional::value_or (const struct optional * const this, int def)
{
bool D.2901;
bool b;
bool _1;
int _2;
int _3;
bool retval.0_7;
int _9;
int _10;
bool _11;
<bb 2> :
_1 = this_5(D)->has_val;
_2 = (int) _1;
b_6 = (bool) _2;
_11 = b_6;
retval.0_7 = _11;
if (retval.0_7 != 0)
goto <bb 3>; [INV]
else
goto <bb 4>; [INV]
<bb 3> :
_10 = this_5(D)->D.2865.val;
// predicted unlikely by early return (on trees) predictor.
goto <bb 5>; [INV]
<bb 4> :
_9 = def_8(D);
// predicted unlikely by early return (on trees) predictor.
<bb 5> :
# _3 = PHI <_10(3), _9(4)>
return _3;
}