https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113239
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The warning seems to be fixed on the trunk but the missed optimization is still
around.
_4 = MEM[(const unsigned char * const &)this_2(D) + 32];
_7 = MEM[(const unsigned char * const &)this_2(D) + 24];
if (_4 == _7)
goto <bb 3>; [17.43%]
else
goto <bb 6>; [82.57%]
<bb 3> [local count: 187153200]:
..
MEM <vector(2) long unsigned int> [(unsigned char * *)_5(D) + 16B] = { 0, 0
};
MEM[(struct _Vector_base *)_5(D) + 16B]._M_impl.D.24644._M_end_of_storage =
0B;
_21 = MEM[(const unsigned char * const &)this_2(D) + 32];
_22 = MEM[(const unsigned char * const &)this_2(D) + 24];
_23 = _21 - _22;
if (_23 > 0)
goto <bb 4>; [90.00%]
else
goto <bb 5>; [10.00%]
if _5 == this_2+8 (which I am 100% sure they can't be due to one being the
return and one being this), then _21 == _22 == 0, then know that >0 is false.
If they are not equal then _21 == _4 == _7 == _21 so _23 == 0 and we know that
>0 is also false.