Workaround following [PATCH] Pul all constants last in tree_swap_operands_p
authorAlan Lawrence <alan.lawrence@arm.com>
Mon, 22 Sep 2014 14:20:16 +0000 (14:20 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Mon, 22 Sep 2014 14:20:16 +0000 (14:20 +0000)
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01509.html
gcc/:
        * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs.

From-SVN: r215465

gcc/ChangeLog
gcc/fold-const.c

index ac79f4fe8e9868e45cc5b9dc1eef5d2935b5253d..f788b9991f0250eeb07078dd9b306efe24c89481 100644 (file)
@@ -1,3 +1,7 @@
+2014-09-22  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * fold-const.c (tree_swap_operands_p): Strip only sign-preserving NOPs.
+
 2014-09-22  Richard Biener  <rguenther@suse.de>
 
        * gimplify.c (gimplify_init_constructor): Do not leave
index 5cfc6461a4bf6b24dba870bdc742b879607f3f54..9f1bc098ed34c8e64ffc02fc404b19f3d619055b 100644 (file)
@@ -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;