diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-01-31 17:44:48 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-01-31 17:44:48 -0500 |
commit | fc06d7aaee369e5d8847640c7fc2b16c98a0dc68 (patch) | |
tree | 42c3d958403bbc272f19706969facb70fa3d8292 /gcc/combine.c | |
parent | 8935266327db0b92d657a86b23ecb6ef473e07a3 (diff) | |
download | gcc-fc06d7aaee369e5d8847640c7fc2b16c98a0dc68.zip gcc-fc06d7aaee369e5d8847640c7fc2b16c98a0dc68.tar.gz gcc-fc06d7aaee369e5d8847640c7fc2b16c98a0dc68.tar.bz2 |
(simplify_and_const_int): Never consider bits outside of MODE.
From-SVN: r3398
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 8be5a05..1bf0405 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5899,8 +5899,11 @@ simplify_and_const_int (x, mode, varop, constop) if (GET_CODE (varop) == CONST_INT) return GEN_INT (constop & INTVAL (varop)); - /* See what bits may be nonzero in VAROP. */ - nonzero = nonzero_bits (varop, mode); + /* See what bits may be nonzero in VAROP. Unlike the general case of + a call to nonzero_bits, here we don't care about bits outside + MODE. */ + + nonzero = nonzero_bits (varop, mode) & GET_MODE_MASK (mode); /* Turn off all bits in the constant that are known to already be zero. Thus, if the AND isn't needed at all, we will have CONSTOP == NONZERO_BITS |