aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-01-16 23:17:21 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-01-16 23:17:21 +0000
commit69877d6db907be210696282c9f9f41f977c844d2 (patch)
treeb3775c869a3b9278e971f092cf92edaf25aa4a72 /include/llvm/Support
parent5db391c67d0922f4ab2ba57c07def19759c801a4 (diff)
Wrapping __popcnt64 for MSVC so that it's only used on 64-bit builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/MathExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index eaab8abe07..b8631a5697 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -317,7 +317,7 @@ inline unsigned CountPopulation_32(uint32_t Value) {
inline unsigned CountPopulation_64(uint64_t Value) {
#if __GNUC__ >= 4
return __builtin_popcountll(Value);
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && defined(_M_X64)
return __popcnt64(Value);
#else
uint64_t v = Value - ((Value >> 1) & 0x5555555555555555ULL);