diff options
author | bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-23 16:43:24 +0000 |
---|---|---|
committer | bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-23 16:43:24 +0000 |
commit | 1f3b83af524f926a42b312b954966ca349d9b69f (patch) | |
tree | ff49113424954fc128f22d29310fdf6c0c984bbc /gcc/optabs.c | |
parent | 94d11afb008980a6dd1ecaace046320c2d889ad5 (diff) | |
download | gcc-1f3b83af524f926a42b312b954966ca349d9b69f.tar.gz |
PR middle-end/PR28690
* optabs.c (expand_binop): (emit_cmp_and_jump_insns): Allow EQ compares.
* rtlanal.c (commutative_operand_precedence): Prefer both REG_POINTER
and MEM_POINTER operands over REG and MEM operands.
(swap_commutative_operands_p): Change return value to bool.
* rtl.h: Update the corresponding prototype.
* tree-ssa-address.c (gen_addr_rtx): Use simplify_gen_binary
instead of gen_rtx_PLUS.
* simplify-rtx.c (simplify_plus_minus_op_data_cmp): Change return
value to bool. Change function arguments to rtx's and update code
to match.
(simplify_plus_minus): Update the simplify_plus_minus_op_data_cmp
calls to match the new declaration.
* simplify-rtx.c (simplify_associative_operation): Don't
reorder simplify_binary_operation arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126852 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index c754544f10f..b65d6002f2b 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4070,9 +4070,11 @@ emit_cmp_and_jump_insns (rtx x, rtx y, enum rtx_code comparison, rtx size, /* Swap operands and condition to ensure canonical RTL. */ if (swap_commutative_operands_p (x, y)) { - /* If we're not emitting a branch, this means some caller - is out of sync. */ - gcc_assert (label); + /* If we're not emitting a branch, callers are required to pass + operands in an order conforming to canonical RTL. We relax this + for commutative comparsions so callers using EQ don't need to do + swapping by hand. */ + gcc_assert (label || (comparison == swap_condition (comparison))); op0 = y, op1 = x; comparison = swap_condition (comparison); |