From 33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b Mon Sep 17 00:00:00 2001 From: Kenneth Zadeck Date: Fri, 9 Nov 2012 13:18:49 +0000 Subject: rtl.h (CONST_SCALAR_INT_P): New macro. 2012-11-09 Kenneth Zadeck * rtl.h (CONST_SCALAR_INT_P): New macro. * cfgexpand.c (expand_debug_locations): Changed to use CONST_SCALAR_INT_P macro. * combine.c (try_combine, subst, make_extraction, gen_lowpart_for_combine): Ditto. * cselib.c (entry_and_rtx_equal_p, rtx_equal_for_cselib_1): Ditto. * dwarf2out.c (loc_descriptor): Ditto. * emit-rtl.c (gen_lowpart_common): Ditto. * ira-costs.c (record_reg_classes, record_address_regs): Ditto. * ira-lives.c (single_reg_class): Ditto. * recog.c (simplify_while_replacing, asm_operand_ok, constrain_operands): Ditto. * reload.c (find_reloads): Ditto. * simplify-rtx.c (simplify_unary_operation_1, simplify_const_unary_operation, simplify_binary_operation_1, simplify_const_binary_operation, simplify_relational_operation_1, simplify_subreg): Ditto. From-SVN: r193360 --- gcc/cselib.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'gcc/cselib.c') diff --git a/gcc/cselib.c b/gcc/cselib.c index 1f9f97e..92193ba 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -537,17 +537,15 @@ entry_and_rtx_equal_p (const void *entry, const void *x_arg) rtx x = CONST_CAST_RTX ((const_rtx)x_arg); enum machine_mode mode = GET_MODE (x); - gcc_assert (!CONST_INT_P (x) && GET_CODE (x) != CONST_FIXED - && (mode != VOIDmode || GET_CODE (x) != CONST_DOUBLE)); + gcc_assert (!CONST_SCALAR_INT_P (x) && GET_CODE (x) != CONST_FIXED); if (mode != GET_MODE (v->val_rtx)) return 0; /* Unwrap X if necessary. */ if (GET_CODE (x) == CONST - && (CONST_INT_P (XEXP (x, 0)) - || GET_CODE (XEXP (x, 0)) == CONST_FIXED - || GET_CODE (XEXP (x, 0)) == CONST_DOUBLE)) + && (CONST_SCALAR_INT_P (XEXP (x, 0)) + || GET_CODE (XEXP (x, 0)) == CONST_FIXED)) x = XEXP (x, 0); /* We don't guarantee that distinct rtx's have different hash values, @@ -1030,9 +1028,7 @@ rtx_equal_for_cselib_1 (rtx x, rtx y, enum machine_mode memmode) static rtx wrap_constant (enum machine_mode mode, rtx x) { - if (!CONST_INT_P (x) - && GET_CODE (x) != CONST_FIXED - && !CONST_DOUBLE_AS_INT_P (x)) + if ((!CONST_SCALAR_INT_P (x)) && GET_CODE (x) != CONST_FIXED) return x; gcc_assert (mode != VOIDmode); return gen_rtx_CONST (mode, x); -- cgit v1.1