aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-04-09 10:55:42 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-04-09 10:55:42 -0400
commit7d171a1e9db2230682b5220edfcdae3394c1c496 (patch)
treebf9fd6a55175f5fc8fcb63b66dfde9861a42cfcd /gcc
parent3c8cd8bd6e25180e26cdd48d38ec365d20158c56 (diff)
downloadgcc-7d171a1e9db2230682b5220edfcdae3394c1c496.zip
gcc-7d171a1e9db2230682b5220edfcdae3394c1c496.tar.gz
gcc-7d171a1e9db2230682b5220edfcdae3394c1c496.tar.bz2
(force_to_mode, case ROTATE): Don't assume simplify_binary_operation always returns CONST_INT.
(force_to_mode, case ROTATE): Don't assume simplify_binary_operation always returns CONST_INT. (simplify_shift_const, case IOR, PLUS): Likewise. From-SVN: r7006
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 7b7b393..0616e7c 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5958,7 +5958,7 @@ force_to_mode (x, mode, mask, reg, just_select)
temp = simplify_binary_operation (code == ROTATE ? ROTATERT : ROTATE,
GET_MODE (x), GEN_INT (mask),
XEXP (x, 1));
- if (temp)
+ if (temp && GET_CODE(temp) == CONST_INT)
SUBST (XEXP (x, 0),
force_to_mode (XEXP (x, 0), GET_MODE (x),
INTVAL (temp), reg, next_select));
@@ -7869,6 +7869,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
&& (new = simplify_binary_operation (code, result_mode,
XEXP (varop, 1),
GEN_INT (count))) != 0
+ && GET_CODE(new) == CONST_INT
&& merge_outer_ops (&outer_op, &outer_const, GET_CODE (varop),
INTVAL (new), result_mode, &complement_p))
{
@@ -7988,6 +7989,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
&& (new = simplify_binary_operation (ASHIFT, result_mode,
XEXP (varop, 1),
GEN_INT (count))) != 0
+ && GET_CODE(new) == CONST_INT
&& merge_outer_ops (&outer_op, &outer_const, PLUS,
INTVAL (new), result_mode, &complement_p))
{