[llvm] [ADT] Update hash function of uint64_t for DenseMap (PR #95734)
Chuanqi Xu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 18:58:08 PDT 2024
================
@@ -137,7 +137,10 @@ template<> struct DenseMapInfo<unsigned long> {
static inline unsigned long getTombstoneKey() { return ~0UL - 1L; }
static unsigned getHashValue(const unsigned long& Val) {
- return (unsigned)(Val * 37UL);
+ if constexpr (sizeof(Val) == 4)
----------------
ChuanqiXu9 wrote:
Yeah, I'd like to keep the condition too.
https://github.com/llvm/llvm-project/pull/95734
More information about the llvm-commits
mailing list