[PATCH] D28221: Add check for AVX512 support before assuming skylake processor is SKX.

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 21:58:16 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL291084: [X86] Change getHostCPUName to report Intel model 0x4e as "skylake" instead of… (authored by ctopper).

Changed prior to commit:
  https://reviews.llvm.org/D28221?vs=83137&id=83193#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28221

Files:
  llvm/trunk/lib/Support/Host.cpp


Index: llvm/trunk/lib/Support/Host.cpp
===================================================================
--- llvm/trunk/lib/Support/Host.cpp
+++ llvm/trunk/lib/Support/Host.cpp
@@ -475,14 +475,22 @@
 
     // Skylake:
     case 0x4e:
-      *Type = INTEL_COREI7; // "skylake-avx512"
-      *Subtype = INTEL_COREI7_SKYLAKE_AVX512;
-      break;
     case 0x5e:
       *Type = INTEL_COREI7; // "skylake"
       *Subtype = INTEL_COREI7_SKYLAKE;
       break;
 
+    // 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"
+      }
+      break;
+
     case 0x1c: // Most 45 nm Intel Atom processors
     case 0x26: // 45 nm Atom Lincroft
     case 0x27: // 32 nm Atom Medfield


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28221.83193.patch
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170105/47988a01/attachment.bin>


More information about the llvm-commits mailing list