diff options
author | Pengfei Wang <pengfei.wang@intel.com> | 2019-06-07 08:31:35 +0000 |
---|---|---|
committer | Pengfei Wang <pengfei.wang@intel.com> | 2019-06-07 08:31:35 +0000 |
commit | f8b28931a751a09e14396e467da830886746fc1e (patch) | |
tree | 337d204094a3283ef3f17c0e43c81090aa495814 /llvm/lib/Support/Host.cpp | |
parent | 67f9dc60b8daf69a7119a92b9f525eece0887e4f (diff) | |
download | bcm5719-llvm-f8b28931a751a09e14396e467da830886746fc1e.tar.gz bcm5719-llvm-f8b28931a751a09e14396e467da830886746fc1e.zip |
[X86] -march=cooperlake (llvm)
Support intel -march=cooperlake in llvm
Patch by Shengchen Kan (skan)
Differential Revision: https://reviews.llvm.org/D62836
llvm-svn: 362776
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 221a0af76d1..df2d4dcca2a 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -672,7 +672,9 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, // Skylake Xeon: case 0x55: *Type = X86::INTEL_COREI7; - if (Features2 & (1 << (X86::FEATURE_AVX512VNNI - 32))) + if (Features3 & (1 << (X86::FEATURE_AVX512BF16 - 64))) + *Subtype = X86::INTEL_COREI7_COOPERLAKE; // "cooperlake" + else if (Features2 & (1 << (X86::FEATURE_AVX512VNNI - 32))) *Subtype = X86::INTEL_COREI7_CASCADELAKE; // "cascadelake" else *Subtype = X86::INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512" @@ -748,6 +750,12 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, break; } + if (Features3 & (1 << (X86::FEATURE_AVX512BF16 - 64))) { + *Type = X86::INTEL_COREI7; + *Subtype = X86::INTEL_COREI7_COOPERLAKE; + break; + } + if (Features2 & (1 << (X86::FEATURE_AVX512VNNI - 32))) { *Type = X86::INTEL_COREI7; *Subtype = X86::INTEL_COREI7_CASCADELAKE; |