]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport fix for compile time regression.
authorCaroline Tice <cmtice@google.com>
Tue, 27 Oct 2015 16:58:19 +0000 (09:58 -0700)
committerCaroline Tice <ctice@gcc.gnu.org>
Tue, 27 Oct 2015 16:58:19 +0000 (09:58 -0700)
2015-10-27  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
        * tree.c (int_cst_hash_hash):  Replace XORs with more efficient
        calls to iterative_hash_host_wide_int.

From-SVN: r229450

gcc/ChangeLog
gcc/tree.c

index b96dfcd4c1cb8091a40bf74801e99f8fb0922664..c61d95fe0ffb50ae5f4f576088091640225d860a 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-27  Caroline Tice  <cmtice@google.com>
+
+       (from Richard Biener)
+       * tree.c (int_cst_hash_hash):  Replace XORs with more efficient
+       calls to iterative_hash_host_wide_int.
+
 2015-10-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        Backport from mainline
index 293b29f8e6f9dfa2100916515c8ef0d4f21ccdb0..11fecdb62a3e5c586e339979580cf1f924b3f5b4 100644 (file)
@@ -1119,8 +1119,10 @@ int_cst_hash_hash (const void *x)
 {
   const_tree const t = (const_tree) x;
 
-  return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
-         ^ TYPE_UID (TREE_TYPE (t)));
+  hashval_t hash = TYPE_UID (TREE_TYPE (t));
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_HIGH (t), hash);
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_LOW (t), hash);
+  return hash;
 }
 
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)