From 481755378d5632997e4f91b284a4eef52001b79c Mon Sep 17 00:00:00 2001 From: Kenneth Zadeck Date: Thu, 2 Aug 2012 22:39:57 +0000 Subject: cfgexpand.c (expand_debug_locations): Encapsulate test for CONST_DOUBLE in macro. 2012-08-02 Kenneth Zadeck * cfgexpand.c (expand_debug_locations): Encapsulate test for CONST_DOUBLE in macro. * combine.c (try_combine, gen_lowpart_for_combine): Ditto. * cprop.c (implicit_set_cond_p): Ditto. * cselib.c (rtx_equal_for_cselib_1): Ditto. * expmed.c (expand_mult): Ditto. * expr.c (convert_modes): Ditto. * ira-costs.c (record_reg_classes): Ditto. * ira-lives.c (single_reg_class): Ditto. * optabs.c (expand_copysign_absneg, expand_copysign): Ditto. * print-rtl.c (print_rtx): Ditto. * recog.c (simplify_while_replacing, const_double_operand) (asm_operand_ok, constrain_operands): Ditto. * reg-stack.c (subst_stack_regs_pat): Ditto. * reload.c (find_reloads, find_equiv_reg): Ditto. * rtlanal.c (replace_rtx): Remove test. * rtlanal.c (constant_pool_constant_p, split_double): Encapsulate test for CONST_DOUBLE in macro. * simplify-rtx.c (mode_signbit_p, avoid_constant_pool_reference) (simplify_unary_operation_1, simplify_const_unary_operation) (simplify_binary_operation_1, simplify_const_binary_operation) (simplify_relational_operation_1) (simplify_const_relational_operations) (implify_subreg): Ditto. * varasm.c (output_constant_pool_2): Ditto. * rtl.h (CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_AS_FLOAT_P): New macros. * rtl.def (CONST_DOUBLE): Updated comments. From-SVN: r190105 --- gcc/expmed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/expmed.c') diff --git a/gcc/expmed.c b/gcc/expmed.c index d91d8f1..ac944f1 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3217,7 +3217,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target, coeff = INTVAL (scalar_op1); is_neg = coeff < 0; } - else if (CONST_DOUBLE_P (scalar_op1)) + else if (CONST_DOUBLE_AS_INT_P (scalar_op1)) { /* If we are multiplying in DImode, it may still be a win to try to work with shifts and adds. */ @@ -3290,7 +3290,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target, skip_synth: /* Expand x*2.0 as x+x. */ - if (GET_CODE (scalar_op1) == CONST_DOUBLE && FLOAT_MODE_P (mode)) + if (CONST_DOUBLE_AS_FLOAT_P (scalar_op1)) { REAL_VALUE_TYPE d; REAL_VALUE_FROM_CONST_DOUBLE (d, scalar_op1); -- cgit v1.1