projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5db391c
)
Wrapping __popcnt64 for MSVC so that it's only used on 64-bit builds.
author
Aaron Ballman
<aaron@aaronballman.com>
Wed, 16 Jan 2013 23:17:21 +0000
(23:17 +0000)
committer
Aaron Ballman
<aaron@aaronballman.com>
Wed, 16 Jan 2013 23:17:21 +0000
(23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172670
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/MathExtras.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/MathExtras.h
b/include/llvm/Support/MathExtras.h
index eaab8abe0764408e0015d92fd8c7d482a8b64a7f..b8631a569702fb44a7848f8e5ac2a9e2bf21fc21 100644
(file)
--- 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);