summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-07 22:23:27 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-07 22:23:27 +0000
commit5f76898789cbf6dd1dc930fafe477195ae26c648 (patch)
tree1fe479be7d0037272b7c2cdc78e67963de5da542 /gcc/simplify-rtx.c
parent20dd1cb7be7ef4056251f99dd1a9d2dfaf77be74 (diff)
downloadgcc-5f76898789cbf6dd1dc930fafe477195ae26c648.tar.gz
2005-01-07 Ian Lance Taylor <ian@airs.com>
David Edelsohn <edelsohn@gnu.org> PR rtl-optimization/25662 * optabs.c (simplify_expand_binop): Use simplify_binary_operation for constant operands instead of simplify_gen_binary. * simplify-rtx.c (simplify_gen_binary): Swap commutative operands after trying simplify_binary_operation git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index c773900c405..5a5c5ca9668 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -114,16 +114,16 @@ simplify_gen_binary (enum rtx_code code, enum machine_mode mode, rtx op0,
{
rtx tem;
- /* Put complex operands first and constants second if commutative. */
- if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
- && swap_commutative_operands_p (op0, op1))
- tem = op0, op0 = op1, op1 = tem;
-
/* If this simplifies, do it. */
tem = simplify_binary_operation (code, mode, op0, op1);
if (tem)
return tem;
+ /* Put complex operands first and constants second if commutative. */
+ if (GET_RTX_CLASS (code) == RTX_COMM_ARITH
+ && swap_commutative_operands_p (op0, op1))
+ tem = op0, op0 = op1, op1 = tem;
+
return gen_rtx_fmt_ee (code, mode, op0, op1);
}