[PATCH] D38811: [x86] Add initial skeleton support for "knm" cpu - llvm version
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 11:20:19 PDT 2017
craig.topper created this revision.
This adds Intel's Knights Mill CPU to valid CPU names for the backend. For now its an alias of "knl", but ultimately we need to support AVX5124FMAPS and AVX5124VNNIW instruction sets for it.
https://reviews.llvm.org/D38811
Files:
lib/Support/Host.cpp
lib/Target/X86/X86.td
test/CodeGen/X86/cpus.ll
Index: test/CodeGen/X86/cpus.ll
===================================================================
--- test/CodeGen/X86/cpus.ll
+++ test/CodeGen/X86/cpus.ll
@@ -19,6 +19,8 @@
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=bonnell 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=silvermont 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=goldmont 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
+; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=knl 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
+; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=knm 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=k8 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=opteron 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=athlon64 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
Index: lib/Target/X86/X86.td
===================================================================
--- lib/Target/X86/X86.td
+++ lib/Target/X86/X86.td
@@ -629,6 +629,7 @@
FeatureFastPartialYMMorZMMWrite
]>;
def : KnightsLandingProc<"knl">;
+def : KnightsLandingProc<"knm">; // TODO implement this completely.
def SKXFeatures : ProcessorFeatures<SKLFeatures.Value, [
FeatureAVX512,
Index: lib/Support/Host.cpp
===================================================================
--- lib/Support/Host.cpp
+++ lib/Support/Host.cpp
@@ -339,6 +339,7 @@
AMD_BTVER1,
AMD_BTVER2,
AMDFAM17H,
+ INTEL_KNM,
// Entries below this are not in libgcc/compiler-rt.
INTEL_i386,
INTEL_i486,
@@ -759,6 +760,9 @@
case 0x57:
*Type = INTEL_KNL; // knl
break;
+ case 0x85:
+ *Type = INTEL_KNM; // knm
+ break;
default: // Unknown family 6 CPU, try to guess.
if (Features & (1 << FEATURE_AVX512F)) {
@@ -1167,6 +1171,8 @@
return "goldmont";
case INTEL_KNL:
return "knl";
+ case INTEL_KNM:
+ return "knm";
case INTEL_X86_64:
return "x86-64";
case INTEL_NOCONA:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38811.118649.patch
Type: text/x-patch
Size: 2441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/55d389d4/attachment.bin>
More information about the llvm-commits
mailing list