Fix LLVM's handling and detection of skylake and cannonlake CPUs
Summary:
- Rename `"skylake"` == SkylakeServerProc to `"skylake-avx512"`
- Change `"skylake"` to denote SkylakeClientProc
- Fix the detection of cpu family 6 and model 94 to be
SkylakeClientProc instead of SkylakeServerProc
- Remove the `"cnl"` for CannonLake
Reviewers: craig.topper, delena
Subscribers: zansari, echristo, qcolombet, RKSimon, spatel, DavidKreitzer, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17090
llvm-svn: 261482
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index ffad1d7..1ca8eac 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/llvm/lib/Support/Host.cpp
@@ -373,6 +373,7 @@
// Skylake:
case 78:
+ return "skylake-avx512";
case 94:
return "skylake";
diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td
index 7412914..c805fe3 100644
--- a/llvm/lib/Target/X86/X86.td
+++ b/llvm/lib/Target/X86/X86.td
@@ -474,7 +474,7 @@
// FIXME: define SKL model
class SkylakeClientProc<string Name> : ProcModel<Name, HaswellModel,
SKLFeatures.Value, []>;
-def : SkylakeClientProc<"skl">;
+def : SkylakeClientProc<"skylake">;
// FIXME: define KNL model
class KnightsLandingProc<string Name> : ProcModel<Name, HaswellModel,
@@ -508,7 +508,7 @@
// FIXME: define SKX model
class SkylakeServerProc<string Name> : ProcModel<Name, HaswellModel,
SKXFeatures.Value, []>;
-def : SkylakeServerProc<"skylake">;
+def : SkylakeServerProc<"skylake-avx512">;
def : SkylakeServerProc<"skx">; // Legacy alias.
def CNLFeatures : ProcessorFeatures<SKXFeatures.Value, [
@@ -520,7 +520,6 @@
class CannonlakeProc<string Name> : ProcModel<Name, HaswellModel,
CNLFeatures.Value, []>;
def : CannonlakeProc<"cannonlake">;
-def : CannonlakeProc<"cnl">;
// AMD CPUs.