From 81037f385e346da03c94eadd9fa336e1ab3ea2cc Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 19 Nov 2017 01:12:00 +0000 Subject: [PATCH] [X86] Add skeleton support for icelake CPU. There are several patches out for review right now to implement Icelake features. This adds a CPU to collect them under. llvm-svn: 318612 --- llvm/lib/Target/X86/X86.td | 12 ++++++++++++ llvm/lib/Target/X86/X86Subtarget.h | 3 ++- llvm/test/CodeGen/X86/cpus.ll | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td index 34f2956..573d441 100644 --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -317,6 +317,8 @@ def ProcIntelSKX : SubtargetFeature<"skx", "X86ProcFamily", "IntelSKX", "Intel Skylake Server processors">; def ProcIntelCNL : SubtargetFeature<"cannonlake", "X86ProcFamily", "IntelCannonlake", "Intel Cannonlake processors">; +def ProcIntelICL : SubtargetFeature<"icelake", "X86ProcFamily", + "IntelIcelake", "Intel Icelake processors">; class Proc Features> : ProcessorModel; @@ -662,6 +664,16 @@ class CannonlakeProc : ProcModel; def : CannonlakeProc<"cannonlake">; +def ICLFeatures : ProcessorFeatures; + +class IcelakeProc : ProcModel; +def : IcelakeProc<"icelake">; + // AMD CPUs. def : Proc<"k6", [FeatureX87, FeatureSlowUAMem16, FeatureMMX]>; diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index bd164e7..56587bc 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -70,7 +70,8 @@ protected: IntelSkylake, IntelKNL, IntelSKX, - IntelCannonlake + IntelCannonlake, + IntelIcelake, }; /// X86 processor family: Intel Atom, and others diff --git a/llvm/test/CodeGen/X86/cpus.ll b/llvm/test/CodeGen/X86/cpus.ll index 72f0ee2..04bd74a 100644 --- a/llvm/test/CodeGen/X86/cpus.ll +++ b/llvm/test/CodeGen/X86/cpus.ll @@ -42,10 +42,11 @@ ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=haswell 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=core-avx2 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; 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=cannonlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=skylake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=skx 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=cannonlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=icelake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty ; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=atom 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 -- 2.7.4