forked from OSchip/llvm-project
[LLVM][X86][Goldmont] Adding new target-cpu: Goldmont
[LLVM SIDE] Connecting the GoldMont processor to his feature. Reviewers: 1. igorb 2. zvi 3. delena 4. RKSimon 5. craig.topper Differential Revision: https://reviews.llvm.org/D34504 llvm-svn: 306658
This commit is contained in:
parent
6936506f50
commit
4bcb9c3349
|
@ -327,6 +327,7 @@ enum ProcessorSubtypes {
|
|||
INTEL_COREI7_SKYLAKE_AVX512,
|
||||
INTEL_ATOM_BONNELL,
|
||||
INTEL_ATOM_SILVERMONT,
|
||||
INTEL_ATOM_GOLDMONT,
|
||||
INTEL_KNIGHTS_LANDING,
|
||||
AMDPENTIUM_K6,
|
||||
AMDPENTIUM_K62,
|
||||
|
@ -707,7 +708,12 @@ getIntelProcessorTypeAndSubtype(unsigned int Family, unsigned int Model,
|
|||
*Type = INTEL_ATOM;
|
||||
*Subtype = INTEL_ATOM_SILVERMONT;
|
||||
break; // "silvermont"
|
||||
|
||||
// Goldmont:
|
||||
case 0x5c:
|
||||
case 0x5f:
|
||||
*Type = INTEL_ATOM;
|
||||
*Subtype = INTEL_ATOM_GOLDMONT;
|
||||
break; // "goldmont"
|
||||
case 0x57:
|
||||
*Type = INTEL_XEONPHI; // knl
|
||||
*Subtype = INTEL_KNIGHTS_LANDING;
|
||||
|
@ -1070,6 +1076,8 @@ StringRef sys::getHostCPUName() {
|
|||
switch (Subtype) {
|
||||
case INTEL_ATOM_BONNELL:
|
||||
return "bonnell";
|
||||
case INTEL_ATOM_GOLDMONT:
|
||||
return "goldmont";
|
||||
case INTEL_ATOM_SILVERMONT:
|
||||
return "silvermont";
|
||||
default:
|
||||
|
|
|
@ -300,6 +300,8 @@ def ProcIntelAtom : SubtargetFeature<"atom", "X86ProcFamily", "IntelAtom",
|
|||
"Intel Atom processors">;
|
||||
def ProcIntelSLM : SubtargetFeature<"slm", "X86ProcFamily", "IntelSLM",
|
||||
"Intel Silvermont processors">;
|
||||
def ProcIntelGLM : SubtargetFeature<"glm", "X86ProcFamily", "IntelGLM",
|
||||
"Intel Goldmont processors">;
|
||||
|
||||
class Proc<string Name, list<SubtargetFeature> Features>
|
||||
: ProcessorModel<Name, GenericModel, Features>;
|
||||
|
@ -430,6 +432,34 @@ class SilvermontProc<string Name> : ProcessorModel<Name, SLMModel, [
|
|||
def : SilvermontProc<"silvermont">;
|
||||
def : SilvermontProc<"slm">; // Legacy alias.
|
||||
|
||||
class GoldmontProc<string Name> : ProcessorModel<Name, SLMModel, [
|
||||
ProcIntelGLM,
|
||||
FeatureX87,
|
||||
FeatureMMX,
|
||||
FeatureSSE42,
|
||||
FeatureFXSR,
|
||||
FeatureCMPXCHG16B,
|
||||
FeatureMOVBE,
|
||||
FeaturePOPCNT,
|
||||
FeaturePCLMUL,
|
||||
FeatureAES,
|
||||
FeaturePRFCHW,
|
||||
FeatureCallRegIndirect,
|
||||
FeatureSlowLEA,
|
||||
FeatureSlowIncDec,
|
||||
FeatureSlowBTMem,
|
||||
FeatureLAHFSAHF,
|
||||
FeatureMPX,
|
||||
FeatureSHA,
|
||||
FeatureRDSEED,
|
||||
FeatureXSAVE,
|
||||
FeatureXSAVEOPT,
|
||||
FeatureXSAVEC,
|
||||
FeatureXSAVES,
|
||||
FeatureCLFLUSHOPT
|
||||
]>;
|
||||
def : GoldmontProc<"goldmont">;
|
||||
|
||||
// "Arrandale" along with corei3 and corei5
|
||||
class NehalemProc<string Name> : ProcessorModel<Name, SandyBridgeModel, [
|
||||
FeatureX87,
|
||||
|
|
|
@ -58,7 +58,7 @@ protected:
|
|||
};
|
||||
|
||||
enum X86ProcFamilyEnum {
|
||||
Others, IntelAtom, IntelSLM
|
||||
Others, IntelAtom, IntelSLM, IntelGLM
|
||||
};
|
||||
|
||||
/// X86 processor family: Intel Atom, and others
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
; RUN: llc < %s -mcpu=core2 -mtriple=x86_64-linux | FileCheck -check-prefix=ATOM-NOT64 %s
|
||||
; RUN: llc < %s -mcpu=slm -mtriple=i686-linux | FileCheck -check-prefix=SLM32 %s
|
||||
; RUN: llc < %s -mcpu=slm -mtriple=x86_64-linux | FileCheck -check-prefix=SLM64 %s
|
||||
; RUN: llc < %s -mcpu=goldmont -mtriple=i686-linux | FileCheck -check-prefix=SLM32 %s
|
||||
; RUN: llc < %s -mcpu=goldmont -mtriple=x86_64-linux | FileCheck -check-prefix=SLM64 %s
|
||||
|
||||
|
||||
; fn_ptr.ll
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
; RUN: llc < %s -mcpu=atom -mtriple=i686-linux | FileCheck %s
|
||||
; RUN: llc < %s -mcpu=goldmont -mtriple=i686-linux | FileCheck %s
|
||||
|
||||
; CHECK:BB#5
|
||||
; CHECK-NEXT:leal
|
||||
; CHECK-NEXT:leal
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
; RUN: llc <%s -O2 -mcpu=atom -march=x86 -relocation-model=static | FileCheck -check-prefix=atom %s
|
||||
; RUN: llc <%s -O2 -mcpu=slm -march=x86 -relocation-model=static | FileCheck -check-prefix=slm %s
|
||||
; RUN: llc <%s -O2 -mcpu=goldmont -march=x86 -relocation-model=static | FileCheck -check-prefix=slm %s
|
||||
; RUN: llc <%s -O2 -mcpu=core2 -march=x86 -relocation-model=static | FileCheck %s
|
||||
;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=broadwell 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
|
||||
; 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=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
|
||||
|
@ -34,3 +35,4 @@
|
|||
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=btver1 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
|
||||
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=btver2 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
|
||||
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=znver1 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
|
||||
|
||||
|
|
Loading…
Reference in New Issue