https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86605
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |tree-optimization
Last reconfirmed|2018-07-20 00:00:00 |2021-7-22
Severity|normal |enhancement
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So on the trunk we get:
if (&test != 4B)
goto <bb 4>; [70.00%]
else
goto <bb 3>; [30.00%]
<bb 3> [local count: 322122544]:
<bb 4> [local count: 1073741824]:
# iftmp.0_3 = PHI <10(2), 20(3)>
I know we fold &v != 0B but it seems like if the constant is within a few bytes
of 0, we should fold it similar. Shouldn't we?