Commit 2ab0a5c4 by Torbjorn Granlund

(expand_shift): Truncate immediate count if SHIFT_COUNT_TRUNCATED.

From-SVN: r6538
parent 5b6e175e
......@@ -1602,6 +1602,14 @@ expand_shift (code, mode, shifted, amount, target, unsignedp)
op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0);
#if SHIFT_COUNT_TRUNCATED
if (SHIFT_COUNT_TRUNCATED
&& GET_CODE (op1) == CONST_INT
&& (unsigned HOST_WIDE_INT) INTVAL (op1) >= GET_MODE_BITSIZE (mode))
op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1)
% GET_MODE_BITSIZE (mode));
#endif
if (op1 == const0_rtx)
return shifted;
......
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