From: Richard Sandiford Date: Tue, 2 Sep 2008 18:39:32 +0000 (+0000) Subject: simplify-rtx.c (simplify_binary_operation_1): Check for CONST... X-Git-Tag: releases/gcc-4.4.0~2699 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd59ef130e53a2fd73c0348fe7e304fb8a36af96;p=thirdparty%2Fgcc.git simplify-rtx.c (simplify_binary_operation_1): Check for CONST... gcc/ * simplify-rtx.c (simplify_binary_operation_1): Check for CONST, SYMBOL_REF and LABEL_REF when applying plus_constant, instead of checking for a non-VOID CONSTANT_P. From-SVN: r139903 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a1b44c6b721..b01292a40cc7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-09-02 Richard Sandiford + + * simplify-rtx.c (simplify_binary_operation_1): Check for CONST, + SYMBOL_REF and LABEL_REF when applying plus_constant, instead of + checking for a non-VOID CONSTANT_P. + 2008-09-02 Jan Hubicka * predict.c (pass_strip_predict_hints): Avoid bugs dump file. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 30bafea8ab19..c7cd2189646d 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1594,10 +1594,14 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, to CONST_INT since overflow won't be computed properly if wider than HOST_BITS_PER_WIDE_INT. */ - if (CONSTANT_P (op0) && GET_MODE (op0) != VOIDmode + if ((GET_CODE (op0) == CONST + || GET_CODE (op0) == SYMBOL_REF + || GET_CODE (op0) == LABEL_REF) && GET_CODE (op1) == CONST_INT) return plus_constant (op0, INTVAL (op1)); - else if (CONSTANT_P (op1) && GET_MODE (op1) != VOIDmode + else if ((GET_CODE (op1) == CONST + || GET_CODE (op1) == SYMBOL_REF + || GET_CODE (op1) == LABEL_REF) && GET_CODE (op0) == CONST_INT) return plus_constant (op1, INTVAL (op0));