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

Aaron Ballman aaron at aaronballman.com
Thu Jan 17 12:04:28 PST 2013


Author: aaronballman
Date: Thu Jan 17 14:04:28 2013
New Revision: 172751

URL: http://llvm.org/viewvc/llvm-project?rev=172751&view=rev
Log:
Reverting back to the fallback instead of using the 64-bit popcnt instruction as it doesn't exist on all x64 CPU architectures.

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=172751&r1=172750&r2=172751&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h (original)
+++ llvm/trunk/include/llvm/Support/MathExtras.h Thu Jan 17 14:04:28 2013
@@ -315,8 +315,6 @@
 inline unsigned CountPopulation_64(uint64_t Value) {
 #if __GNUC__ >= 4
   return __builtin_popcountll(Value);
-#elif defined(_MSC_VER) && defined(_M_X64)
-  return __popcnt64(Value);
 #else
   uint64_t v = Value - ((Value >> 1) & 0x5555555555555555ULL);
   v = (v & 0x3333333333333333ULL) + ((v >> 2) & 0x3333333333333333ULL);





More information about the llvm-commits mailing list