aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-05-17 23:21:21 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-05-17 21:21:21 +0000
commite5c56fd9bf8418ff01126783bcd984fb151b21a2 (patch)
tree6be18b336d723f66b33f5327a8908ec4da42a48e /gcc/combine.c
parent949c5d62571446e982b85c6190af0a172d645356 (diff)
downloadgcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.zip
gcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.tar.gz
gcc-e5c56fd9bf8418ff01126783bcd984fb151b21a2.tar.bz2
integrate.c (copy_rtx_and_substitute): Use simplify_gen_subreg.
* integrate.c (copy_rtx_and_substitute): Use simplify_gen_subreg. (simplify_subreg): Handle complex types represented as CONCAT. * recog.c (validate_replace_rtx_1): Properly canonicalize expression * rtl.h (swap_commutative_operands_p): Declare. * rtlanal.c (swap_commutative_operands_p): New. (operand_preference): New static function. * combine.c (combine_simplify_rtx): Use swap_commutative_operands_p. (gen_binary): Likewise. * optabs.c (emit_cmp_and_jump_insns, emit_conditional_move): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational): Likewise. From-SVN: r42224
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 53df2f5..ceb6dc7 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3514,12 +3514,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
/* If this is a commutative operation, put a constant last and a complex
expression first. We don't need to do this for comparisons here. */
if (GET_RTX_CLASS (code) == 'c'
- && ((CONSTANT_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) != CONST_INT)
- || (GET_RTX_CLASS (GET_CODE (XEXP (x, 0))) == 'o'
- && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o')
- || (GET_CODE (XEXP (x, 0)) == SUBREG
- && GET_RTX_CLASS (GET_CODE (SUBREG_REG (XEXP (x, 0)))) == 'o'
- && GET_RTX_CLASS (GET_CODE (XEXP (x, 1))) != 'o')))
+ && swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
{
temp = XEXP (x, 0);
SUBST (XEXP (x, 0), XEXP (x, 1));
@@ -9818,12 +9813,7 @@ gen_binary (code, mode, op0, op1)
/* Put complex operands first and constants second. */
if (GET_RTX_CLASS (code) == 'c'
- && ((CONSTANT_P (op0) && GET_CODE (op1) != CONST_INT)
- || (GET_RTX_CLASS (GET_CODE (op0)) == 'o'
- && GET_RTX_CLASS (GET_CODE (op1)) != 'o')
- || (GET_CODE (op0) == SUBREG
- && GET_RTX_CLASS (GET_CODE (SUBREG_REG (op0))) == 'o'
- && GET_RTX_CLASS (GET_CODE (op1)) != 'o')))
+ && swap_commutative_operands_p (op0, op1))
return gen_rtx_fmt_ee (code, mode, op1, op0);
/* If we are turning off bits already known off in OP0, we need not do