summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-22 07:40:26 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-22 07:40:26 +0000
commitf5ef1390e4526ed8d83edc8d528e78a80a3667e7 (patch)
treee077f1ff6c35cde9817f0a709edaf59ec48986c9 /gcc/expr.c
parent17822ef8b47e893b11a7e32bc82a23339501412c (diff)
downloadppe42-gcc-f5ef1390e4526ed8d83edc8d528e78a80a3667e7.tar.gz
ppe42-gcc-f5ef1390e4526ed8d83edc8d528e78a80a3667e7.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42433 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index b654b460d32..7c7bee7f6d2 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;
OpenPOWER on IntegriCloud