[llvm] [ADT] DenseMapInfo<unsigned long>::getHashValue - avoid MSVC out of bounds shift warning (PR #96173)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 04:42:22 PDT 2024
================
@@ -142,7 +142,7 @@ template<> struct DenseMapInfo<unsigned long> {
if constexpr (sizeof(Val) == 4)
return DenseMapInfo<unsigned>::getHashValue(Val);
else
- return detail::combineHashValue(Val >> 32, Val);
+ return detail::combineHashValue(Val >> (4 * sizeof(Val)), Val);
----------------
nikic wrote:
```suggestion
return densemap::detail::mix(Val);
```
to avoid the issue entirely?
https://github.com/llvm/llvm-project/pull/96173
More information about the llvm-commits
mailing list