From 8c9864f32d6c76ae5f3317148b29629c60a2f26b Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 22 May 2001 09:40:26 +0200 Subject: combine.c (gen_binary): Use swap_commutative_operands_p * combine.c (gen_binary): Use swap_commutative_operands_p (simplify_comparison): Likewise. * expmed.c (emit_store_flag): Likewise. * expr.c (compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. * optabs.c (emit_cmp_and_jump_insn): Revert last patch; abort if not emitting a branch and operands want swapping. From-SVN: r42433 --- gcc/expr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index b654b46..7c7bee7 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10107,8 +10107,7 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align) /* 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; @@ -10190,8 +10189,7 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, align, /* 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; -- cgit v1.1