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
This commit is contained in:
parent
edcfeaeebe
commit
dd59ef130e
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-09-02 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* 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 <jh@suse.cz>
|
||||
|
||||
* predict.c (pass_strip_predict_hints): Avoid bugs dump file.
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue