mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
Reverting back to the fallback instead of using popcnt; this instruction doesn't exist on all CPU architectures. Fixes PR14982
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
792b123338
commit
67828056dd
@ -303,8 +303,6 @@ inline unsigned CountTrailingOnes_64(uint64_t Value) {
|
||||
inline unsigned CountPopulation_32(uint32_t Value) {
|
||||
#if __GNUC__ >= 4
|
||||
return __builtin_popcount(Value);
|
||||
#elif defined(_MSC_VER)
|
||||
return __popcnt(Value);
|
||||
#else
|
||||
uint32_t v = Value - ((Value >> 1) & 0x55555555);
|
||||
v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
|
||||
|
Loading…
Reference in New Issue
Block a user