From 8f399c3e858884a5d0b7f2bc1df162b01acd84e3 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Fri, 21 Nov 2014 14:44:31 +0000 Subject: [PATCH] Revert: Workaround following [PATCH] Pul all constants last in tree_swap_operands_p https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01509.html 2014-09-22 Alan Lawrence gcc/: * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs. From-SVN: r217927 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b14d1d62a0..9902e537dbb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-11-21 Alan Lawrence + + Revert: + 2014-09-22 Alan Lawrence + * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs. + 2014-11-21 Andrew Bennett * config/mips/mips.c (mips_process_sync_loop): Place a diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 9183430205b..740bf0bc17c 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6606,8 +6606,8 @@ tree_swap_operands_p (const_tree arg0, const_tree arg1, bool reorder) if (CONSTANT_CLASS_P (arg0)) return 1; - STRIP_SIGN_NOPS (arg0); - STRIP_SIGN_NOPS (arg1); + STRIP_NOPS (arg0); + STRIP_NOPS (arg1); if (TREE_CONSTANT (arg1)) return 0; -- 2.30.2