https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87104
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-08-27
Ever confirmed|0 |1
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So on GIMPLE the following are not canonicalized:
<bb 2> [local count: 1073741825]:
_1 = i_4(D) & 7;
_8 = (int) i_4(D);
if (_1 == 6)
goto <bb 3>; [20.97%]
else
goto <bb 4>; [79.03%]
vs.
<bb 2> [local count: 1073741825]:
_1 = i_5(D) + 18446744073709551610;
_2 = _1 & 7;
_9 = (int) i_5(D);
if (_2 == 0)
goto <bb 3>; [34.00%]
else
goto <bb 4>; [66.00%]
where I'd call the former better. Thus for some unknown constraint
on @1, @2 and @3
(simplify
(eq (convert? (bit_and (plus @0 INTEGER_CST@3) @2)) @1)
(eq (convert (bit_and @0 @2)) { ... }))