From 5fb34b5498f3349fb7cbe9039e35eb2fd635ff59 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 27 Nov 2018 18:05:00 +0000 Subject: [X86] Add cascade lake arch in X86 target. This is skylake-avx512 with the addition of avx512vnni ISA. Patch by Jianping Chen Differential Revision: https://reviews.llvm.org/D54785 llvm-svn: 347681 --- llvm/lib/Support/Host.cpp | 6 ++++++ llvm/lib/Target/X86/X86.td | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 9f5bf1ffa12..d5a688c7fb9 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -702,6 +702,12 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, break; } + if (Features2 & (1 << (X86::FEATURE_AVX512VNNI - 32))) { + *Type = X86::INTEL_COREI7; + *Subtype = X86::INTEL_COREI7_CASCADELAKE; + break; + } + if (Features & (1 << X86::FEATURE_AVX512VL)) { *Type = X86::INTEL_COREI7; *Subtype = X86::INTEL_COREI7_SKYLAKE_AVX512; diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td index 74135656528..6b1749fc750 100644 --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -883,6 +883,17 @@ class SkylakeServerProc : ProcModel; def : SkylakeServerProc<"skx">; // Legacy alias. +def CLXFeatures : ProcessorFeatures; + +class CascadelakeProc : ProcModel; +def : CascadelakeProc<"cascadelake">; + def CNLFeatures : ProcessorFeatures