[Bug middle-end/27743] [4.1/4.2 Regression] Wrong code for ((unsigned) ((a) >> 2)) >> 15
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 23 14:27:00 GMT 2006
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-05-23 14:27 -------
/* Turn (a OP c1) OP c2 into a OP (c1+c2). */
if (TREE_CODE (arg0) == code && host_integerp (arg1, false)
&& TREE_INT_CST_LOW (arg1) < TYPE_PRECISION (type)
&& host_integerp (TREE_OPERAND (arg0, 1), false)
&& TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1)) < TYPE_PRECISION (type))
{
this should read TREE_CODE (op0) == code. Or
if (kind == tcc_comparison)
{
STRIP_SIGN_NOPS (arg0);
STRIP_SIGN_NOPS (arg1);
}
else
{
STRIP_NOPS (arg0);
STRIP_NOPS (arg1);
}
should use STRIP_SIGN_NOPS for arg0 and shifts.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27743
More information about the Gcc-bugs
mailing list