diff options
author | Jan Hubicka <jh@suse.cz> | 2001-05-17 23:21:21 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-05-17 21:21:21 +0000 |
commit | e5c56fd9bf8418ff01126783bcd984fb151b21a2 (patch) | |
tree | 6be18b336d723f66b33f5327a8908ec4da42a48e /gcc/optabs.c | |
parent | 949c5d62571446e982b85c6190af0a172d645356 (diff) | |
download | gcc-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/optabs.c')
-rw-r--r-- | gcc/optabs.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index c28b4d9..a2a42c6 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3290,8 +3290,7 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label) rtx op0; rtx op1; - if ((CONSTANT_P (x) && ! CONSTANT_P (y)) - || (GET_CODE (x) == CONST_INT && GET_CODE (y) != CONST_INT)) + if (swap_commutative_operands_p (x, y)) { /* Swap operands and condition to ensure canonical RTL. */ op0 = y; @@ -3609,12 +3608,12 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode, { rtx tem, subtarget, comparison, insn; enum insn_code icode; + enum rtx_code reversed; /* If one operand is constant, make it the second one. Only do this if the other operand is not constant as well. */ - if ((CONSTANT_P (op0) && ! CONSTANT_P (op1)) - || (GET_CODE (op0) == CONST_INT && GET_CODE (op1) != CONST_INT)) + if (swap_commutative_operands_p (op0, op1)) { tem = op0; op0 = op1; @@ -3633,16 +3632,14 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode, if (cmode == VOIDmode) cmode = GET_MODE (op0); - if (((CONSTANT_P (op2) && ! CONSTANT_P (op3)) - || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT)) - && (GET_MODE_CLASS (GET_MODE (op1)) != MODE_FLOAT - || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || flag_unsafe_math_optimizations)) + if (swap_commutative_operands_p (op2, op3) + && ((reversed = reversed_comparison_code_parts (code, op0, op1, NULL)) + != UNKNOWN)) { tem = op2; op2 = op3; op3 = tem; - code = reverse_condition (code); + code = reversed; } if (mode == VOIDmode) |