[Bug tree-optimization/88280] missing folding of logical and bitwise AND
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 30 12:56:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88280
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-11-30
Version|unknown |9.0
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. g and h end up like this before RTL expansion (initial folding
produces this):
j_6 = i_4(D) & a_5(D);
_1 = i_4(D) != 0;
_2 = j_6 != 0;
_3 = _1 & _2;
_7 = (int) _3;
return _7;
and for e we do not combine the i != 0 check.
<bb 2> [local count: 1073741824]:
if (i_3(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870913]:
_1 = i_3(D) & a_4(D);
_6 = _1 != 0;
_7 = (int) _6;
<bb 4> [local count: 1073741824]:
# iftmp.0_2 = PHI <_7(3), i_3(D)(2)>
return iftmp.0_2;
More information about the Gcc-bugs
mailing list