summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__hash_table
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-07-24 06:22:25 +0000
committerEric Fiselier <eric@efcs.ca>2016-07-24 06:22:25 +0000
commit1a06fe5f7ea47112a5e8ac6e0cc471ef96759591 (patch)
tree5cb3bb9ac19f0e535cf1590871de183847bc80df /libcxx/include/__hash_table
parent904a5d700752b19fec363f4bf8d00d5eef2c7efd (diff)
downloadbcm5719-llvm-1a06fe5f7ea47112a5e8ac6e0cc471ef96759591.tar.gz
bcm5719-llvm-1a06fe5f7ea47112a5e8ac6e0cc471ef96759591.zip
Skip chash computation in insert/emplace if the unconstrained hash matches.
llvm-svn: 276549
Diffstat (limited to 'libcxx/include/__hash_table')
-rw-r--r--libcxx/include/__hash_table2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 0210c6f67b7..6a0e6fea08a 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -1961,7 +1961,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
if (__nd != nullptr)
{
for (__nd = __nd->__next_; __nd != nullptr &&
- __constrain_hash(__nd->__hash(), __bc) == __chash;
+ (__nd->__hash() == __hash || __constrain_hash(__nd->__hash(), __bc) == __chash);
__nd = __nd->__next_)
{
if (key_eq()(__nd->__upcast()->__value_, __k))
OpenPOWER on IntegriCloud