aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-09-28 16:00:13 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-09-28 16:00:13 -0700
commit1347292b885d50b86ca6eb5abe9583eac53911e5 (patch)
tree1e0def9ccb38fef84e7248e32b64d18df6be6d12
parentb5e962556704ca9d18aeaea01ee4cb41bebfb318 (diff)
downloadgcc-1347292b885d50b86ca6eb5abe9583eac53911e5.zip
gcc-1347292b885d50b86ca6eb5abe9583eac53911e5.tar.gz
gcc-1347292b885d50b86ca6eb5abe9583eac53911e5.tar.bz2
(force_to_mode, LSHIFTRT case): Avoid shifts larger
than HOST_BITS_PER_WIDE_INT. From-SVN: r5516
-rw-r--r--gcc/combine.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d6ce034..45d572a 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5771,10 +5771,12 @@ force_to_mode (x, mode, mask, reg)
break;
case LSHIFTRT:
- /* Here we can only do something if the shift count is a constant and
- we can do arithmetic in OP_MODE. */
+ /* Here we can only do something if the shift count is a constant,
+ this shift constant is valid for the host, and we can do arithmetic
+ in OP_MODE. */
if (GET_CODE (XEXP (x, 1)) == CONST_INT
+ && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
&& GET_MODE_BITSIZE (op_mode) <= HOST_BITS_PER_WIDE_INT)
{
rtx inner = XEXP (x, 0);