craig.topper added inline comments.

================
Comment at: include/bit:140
   static_assert(sizeof(unsigned) == 4, "");
   return __popcnt(__x);
 }
----------------
MSVC blindly uses the popcnt instruction whenever it sees this intrinsic. So 
this only works on Nehalem and newer Intel CPUs. And Barcelona and newer AMD 
CPUs. This is why llvm uses a bit math version of popcnt for MSVC in 
include/llvm/Support/MathExtras.h


================
Comment at: include/bit:150
   static_assert(sizeof(unsigned long long) == 8, "");
   return __popcnt64(__x);
 }
----------------
This doesn't exist in 32-bit MSVC.


https://reviews.llvm.org/D50876



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to