From 41a789caa8a74310b4c1750751e8fe84ea075a77 Mon Sep 17 00:00:00 2001 From: alalaw01 Date: Mon, 22 Sep 2014 14:20:16 +0000 Subject: [PATCH] Workaround following [PATCH] Pul all constants last in tree_swap_operands_p https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01509.html gcc/: * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215465 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/fold-const.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac79f4fe8e98..f788b9991f02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-09-22 Alan Lawrence + + * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs. + 2014-09-22 Richard Biener * gimplify.c (gimplify_init_constructor): Do not leave diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5cfc6461a4bf..9f1bc098ed34 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6647,8 +6647,8 @@ tree_swap_operands_p (const_tree arg0, const_tree arg1, bool reorder) if (CONSTANT_CLASS_P (arg0)) return 1; - STRIP_NOPS (arg0); - STRIP_NOPS (arg1); + STRIP_SIGN_NOPS (arg0); + STRIP_SIGN_NOPS (arg1); if (TREE_CONSTANT (arg1)) return 0; -- 2.47.2