Fix POPCNT support for Intel compiler under Windows
[stockfish] / src / bitcount.h
index 0992c00..3c5ba2a 100644 (file)
@@ -85,6 +85,8 @@ template<>
 inline int count_1s<CNT_POPCNT>(Bitboard b) {
 #if !defined(USE_POPCNT)
   return int(b != 0); // Avoid 'b not used' warning
+#elif defined(_MSC_VER) && defined(__INTEL_COMPILER)
+  return _mm_popcnt_u64(b);
 #elif defined(_MSC_VER)
   return __popcnt64(b);
 #elif defined(__GNUC__)