[X86] Remove check for AVX512 support from skylake-avx512 detection in getHostCPUName.
authorCraig Topper <craig.topper@intel.com>
Sun, 9 Jul 2017 07:26:14 +0000 (07:26 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 9 Jul 2017 07:26:14 +0000 (07:26 +0000)
Users of getHostCPUName should also use getHostCPUFeatures which will take care of making sure avx512 is disabled if the CPU doesn't support it. This is consistent with what we do for other CPUs.

llvm-svn: 307495

llvm/lib/Support/Host.cpp

index 8469ae4..0c28c61 100644 (file)
@@ -681,12 +681,7 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
     // Skylake Xeon:
     case 0x55:
       *Type = INTEL_COREI7;
-      // Check that we really have AVX512
-      if (Features & (1 << FEATURE_AVX512)) {
-        *Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512"
-      } else {
-        *Subtype = INTEL_COREI7_SKYLAKE; // "skylake"
-      }
+      *Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512"
       break;
 
     case 0x1c: // Most 45 nm Intel Atom processors