diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-07-18 00:28:14 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-07-18 00:28:14 +0000 |
commit | c715abddc7937701bde7e38f43338303b79d0e38 (patch) | |
tree | e3a66c07d2f13df7bd1630e4d798fae57f6df5d9 /gcc/cse.c | |
parent | 3e4093b64f2e2623bba32e733e7e8f08efc700ac (diff) | |
download | gcc-c715abddc7937701bde7e38f43338303b79d0e38.zip gcc-c715abddc7937701bde7e38f43338303b79d0e38.tar.gz gcc-c715abddc7937701bde7e38f43338303b79d0e38.tar.bz2 |
cse.c (fold_rtx): Use swap_commutative_operands_p to determine whether to reorder the operands of...
* cse.c (fold_rtx): Use swap_commutative_operands_p to determine
whether to reorder the operands of a commutative binary operator.
From-SVN: r69534
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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); |