]> git.sesse.net Git - stockfish/blobdiff - src/bitcount.h
Fix a warning with __popcnt64() intrinsics
[stockfish] / src / bitcount.h
index 0992c00625e084ecc1fa78110ccef0c04a500166..940dbaf52af207c8a24977e8780b42679e36650c 100644 (file)
@@ -85,8 +85,10 @@ 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);
+  return (int)__popcnt64(b);
 #elif defined(__GNUC__)
   unsigned long ret;
   __asm__("popcnt %1, %0" : "=r" (ret) : "r" (b));