[X86] Fixing VPOPCNTDQ feature set lookup.
authorOren Ben Simhon <oren.ben.simhon@intel.com>
Sun, 28 May 2017 11:26:11 +0000 (11:26 +0000)
committerOren Ben Simhon <oren.ben.simhon@intel.com>
Sun, 28 May 2017 11:26:11 +0000 (11:26 +0000)
llvm-svn: 304086

llvm/lib/Support/Host.cpp

index 8ee1094..234f743 100644 (file)
@@ -1390,7 +1390,6 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
   Features["sha"] = HasLeaf7 && ((EBX >> 29) & 1);
 
   // AVX512 is only supported if the OS supports the context save for it.
-  Features["avx512vpopcntdq"] = HasLeaf7 && ((EBX >> 14) & 1) && HasAVX512Save;
   Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save;
   Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save;
   Features["avx512ifma"] = HasLeaf7 && ((EBX >> 21) & 1) && HasAVX512Save;
@@ -1402,6 +1401,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
 
   Features["prefetchwt1"] = HasLeaf7 && (ECX & 1);
   Features["avx512vbmi"] = HasLeaf7 && ((ECX >> 1) & 1) && HasAVX512Save;
+  Features["avx512vpopcntdq"] = HasLeaf7 && ((ECX >> 14) & 1) && HasAVX512Save;  
   // Enable protection keys
   Features["pku"] = HasLeaf7 && ((ECX >> 4) & 1);