Commit 3e63dd3a by Adam Nemet Committed by Adam Nemet

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
parent b641d7fc
2009-07-18 Adam Nemet <anemet@caviumnetworks.com>
* combine.c (try_widen_shift_mode) <LSHIFTRT>: Allow widening if the
high-order bits are zero.
2009-07-18 Adam Nemet <anemet@caviumnetworks.com>
* combine.c (simplify_shift_const_1): Split code to determine
shift_mode into ...
(try_widen_shift_mode): ... here. Allow widening for ASHIFTRT if the
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment