aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-07-18 03:16:32 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-07-18 03:16:32 +0000
commitcf6bcbd0848c32a1760ee7be49f6a57fad00e69c (patch)
treeb98232c8fbe6ccb48b4e71c648deb56040ee550d /gcc/simplify-rtx.c
parent2b187c63e263707a88b01352880a24107baa88be (diff)
downloadgcc-cf6bcbd0848c32a1760ee7be49f6a57fad00e69c.zip
gcc-cf6bcbd0848c32a1760ee7be49f6a57fad00e69c.tar.gz
gcc-cf6bcbd0848c32a1760ee7be49f6a57fad00e69c.tar.bz2
simplify-rtx.c (simplify_rtx): Use simplify_gen_binary to swap commutative operands instead of modifying the...
* simplify-rtx.c (simplify_rtx): Use simplify_gen_binary to swap commutative operands instead of modifying the RTL in-place. From-SVN: r69539
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 8568529..d4b5162 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3052,15 +3052,9 @@ simplify_rtx (rtx x)
XEXP (x, 0), GET_MODE (XEXP (x, 0)));
case 'c':
if (swap_commutative_operands_p (XEXP (x, 0), XEXP (x, 1)))
- {
- rtx tem;
+ return simplify_gen_binary (code, mode, XEXP (x, 1), XEXP (x, 0));
- tem = XEXP (x, 0);
- XEXP (x, 0) = XEXP (x, 1);
- XEXP (x, 1) = tem;
- return simplify_binary_operation (code, mode,
- XEXP (x, 0), XEXP (x, 1));
- }
+ /* ... fall through ... */
case '2':
return simplify_binary_operation (code, mode, XEXP (x, 0), XEXP (x, 1));