[llvm-commits] [llvm] r172734 - /llvm/trunk/include/llvm/Support/MathExtras.h

Aaron Ballman aaron at aaronballman.com
Thu Jan 17 10:27:31 PST 2013


Author: aaronballman
Date: Thu Jan 17 12:27:30 2013
New Revision: 172734

URL: http://llvm.org/viewvc/llvm-project?rev=172734&view=rev
Log:
Reverting back to the fallback instead of using popcnt; this instruction doesn't exist on all CPU architectures.  Fixes PR14982

Modified:
    llvm/trunk/include/llvm/Support/MathExtras.h

Modified: llvm/trunk/include/llvm/Support/MathExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MathExtras.h?rev=172734&r1=172733&r2=172734&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h (original)
+++ llvm/trunk/include/llvm/Support/MathExtras.h Thu Jan 17 12:27:30 2013
@@ -303,8 +303,6 @@
 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);





More information about the llvm-commits mailing list