From: Caroline Tice Date: Tue, 27 Oct 2015 16:58:19 +0000 (-0700) Subject: Backport fix for compile time regression. X-Git-Tag: releases/gcc-4.9.4~536 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c16e99ccf272cb3c64b038a787a2a608e5346b36;p=thirdparty%2Fgcc.git Backport fix for compile time regression. 2015-10-27 Caroline Tice (from Richard Biener) * tree.c (int_cst_hash_hash): Replace XORs with more efficient calls to iterative_hash_host_wide_int. From-SVN: r229450 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b96dfcd4c1cb..c61d95fe0ffb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-10-27 Caroline Tice + + (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 Backport from mainline diff --git a/gcc/tree.c b/gcc/tree.c index 293b29f8e6f9..11fecdb62a3e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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)