From cf6bcbd0848c32a1760ee7be49f6a57fad00e69c Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 18 Jul 2003 03:16:32 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/simplify-rtx.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fe5852478a..514dfc56375 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-07-17 Roger Sayle + + * simplify-rtx.c (simplify_rtx): Use simplify_gen_binary to swap + commutative operands instead of modifying the RTL in-place. + 2003-07-17 Mark Mitchell PR optimization/11557 diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 8568529ef87..d4b51627ca3 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)); -- 2.30.2