Skip to content

Commit 7205562

Browse files
authored
[Support] Fix xxh3_128bits for Win32 builds after #95863
`__emulu` is used without including `intrin.h`. Actually, it's better to rely on compiler optimizations. In this LLVM copy, we try to eliminate unneceeded workarounds for old compilers. Pull Request: #96931
1 parent 4403ece commit 7205562

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/Support/xxhash.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -453,18 +453,7 @@ uint64_t llvm::xxh3_64bits(ArrayRef<uint8_t> data) {
453453
#define XXH_rotl64(x, r) (((x) << (r)) | ((x) >> (64 - (r))))
454454
#endif
455455

456-
#if defined(_MSC_VER) && defined(_M_IX86)
457-
#define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y))
458-
#else
459-
/*
460-
* Downcast + upcast is usually better than masking on older compilers like
461-
* GCC 4.2 (especially 32-bit ones), all without affecting newer compilers.
462-
*
463-
* The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands
464-
* and perform a full 64x64 multiply -- entirely redundant on 32-bit.
465-
*/
466456
#define XXH_mult32to64(x, y) ((uint64_t)(uint32_t)(x) * (uint64_t)(uint32_t)(y))
467-
#endif
468457

469458
/*!
470459
* @brief Calculates a 64->128-bit long multiply.

0 commit comments

Comments
 (0)