mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
DenseMap<uintptr_t,...> doesn't allow all values as keys.
Avoid colliding with the sentinels, hopefully unbreaking llvm-gcc-x86_64-linux-selfhost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a0807f57ca
commit
2bc2a08b1b
@ -632,6 +632,8 @@ bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) {
|
||||
Hash ^= reinterpret_cast<uintptr_t>(static_cast<Value *>(*I));
|
||||
Hash = (Hash << 7) | (Hash >> (sizeof(uintptr_t) * CHAR_BIT - 7));
|
||||
}
|
||||
// Avoid colliding with the DenseMap sentinels ~0 and ~0-1.
|
||||
Hash >>= 1;
|
||||
// If we've never seen this hash value before, it's a unique PHI.
|
||||
std::pair<DenseMap<uintptr_t, PHINode *>::iterator, bool> Pair =
|
||||
HashMap.insert(std::make_pair(Hash, PN));
|
||||
|
Loading…
Reference in New Issue
Block a user