diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-18 00:28:14 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-18 00:28:14 +0000 |
commit | 1d0406e567e83323a64504ffeec9aaeb0ffc94b7 (patch) | |
tree | e3a66c07d2f13df7bd1630e4d798fae57f6df5d9 /gcc/cse.c | |
parent | 276beea2f86e5daac59353636de0d0c0e07b89e4 (diff) | |
download | gcc-1d0406e567e83323a64504ffeec9aaeb0ffc94b7.tar.gz |
* cse.c (fold_rtx): Use swap_commutative_operands_p to determine
whether to reorder the operands of a commutative binary operator.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 5e6c9e40b17..7d051021936 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -3783,10 +3783,11 @@ fold_rtx (rtx x, rtx insn) || code == LTGT || code == UNEQ || code == ORDERED || code == UNORDERED) { - if (must_swap || (const_arg0 - && (const_arg1 == 0 - || (GET_CODE (const_arg0) == CONST_INT - && GET_CODE (const_arg1) != CONST_INT)))) + if (must_swap + || swap_commutative_operands_p (const_arg0 ? const_arg0 + : XEXP (x, 0), + const_arg1 ? const_arg1 + : XEXP (x, 1))) { rtx tem = XEXP (x, 0); |