summaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 21:21:21 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 21:21:21 +0000
commit09f800b9baea8ff279f12fc8dd31e75620156cd4 (patch)
tree6be18b336d723f66b33f5327a8908ec4da42a48e /gcc/optabs.c
parentf760707b3708c8c4848cae367cce7a970fc266cd (diff)
downloadgcc-09f800b9baea8ff279f12fc8dd31e75620156cd4.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index c28b4d97c77..a2a42c636b1 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)