diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2009-07-18 21:48:19 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-07-18 21:48:19 +0000 |
commit | 3e63dd3a366d314071d1568917c5a9887d113d68 (patch) | |
tree | d2ca640a0b4806375951e0d2cc773e62985e8754 /gcc/combine.c | |
parent | b641d7fca3c917bd40da5de8e9f16876bdd4a5df (diff) | |
download | gcc-3e63dd3a366d314071d1568917c5a9887d113d68.zip gcc-3e63dd3a366d314071d1568917c5a9887d113d68.tar.gz gcc-3e63dd3a366d314071d1568917c5a9887d113d68.tar.bz2 |
combine.c (try_widen_shift_mode): Allow widening if the high-order bits are zero.
* combine.c (try_widen_shift_mode) <LSHIFTRT>: Allow widening if the
high-order bits are zero.
From-SVN: r149779
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index a0157df..12f0ed8 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9005,8 +9005,15 @@ try_widen_shift_mode (enum rtx_code code, rtx op, > (unsigned) (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (orig_mode))) return mode; - /* fall through */ + return orig_mode; + case LSHIFTRT: + /* Similarly here but with zero bits. */ + if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT + && (nonzero_bits (op, mode) & ~GET_MODE_MASK (orig_mode)) == 0) + return mode; + /* fall through */ + case ROTATE: return orig_mode; |