From 7d171a1e9db2230682b5220edfcdae3394c1c496 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 9 Apr 1994 10:55:42 -0400 Subject: [PATCH] (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 --- gcc/combine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/combine.c b/gcc/combine.c index 7b7b39375bc..0616e7c40da 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)) { -- 2.30.2