diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-06-19 21:17:26 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-06-24 07:59:17 -0700 |
commit | 403e166b974f53982d78efdd70938d05b6983b2a (patch) | |
tree | c118a62be78b35970d1a40adb6768d88f88744c4 /gcc | |
parent | 6c35d16a3925958b3a22426de0cb8e04f654b6dd (diff) | |
download | gcc-403e166b974f53982d78efdd70938d05b6983b2a.zip gcc-403e166b974f53982d78efdd70938d05b6983b2a.tar.gz gcc-403e166b974f53982d78efdd70938d05b6983b2a.tar.bz2 |
x86: Add Cooper Lake detection with AVX512BF16
All Sky Lake family processors have the same CPUID model number, 0x55.
The differences are Cascade Lake has AVX512VNNI and Cooper Lake has
AVX512VNNI + AVX512BF16. Check AVX512BF16 for Cooper Lake.
PR target/95774
* common/config/i386/cpuinfo.h (get_intel_cpu): Add Cooper Lake
detection with AVX512BF16.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/common/config/i386/cpuinfo.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h index 2d72b3b..27b7b4d 100644 --- a/gcc/common/config/i386/cpuinfo.h +++ b/gcc/common/config/i386/cpuinfo.h @@ -398,7 +398,15 @@ get_intel_cpu (struct __processor_model *cpu_model, CHECK___builtin_cpu_is ("corei7"); cpu_model->__cpu_type = INTEL_COREI7; if (has_cpu_feature (cpu_model, cpu_features2, - FEATURE_AVX512VNNI)) + FEATURE_AVX512BF16)) + { + /* Cooper Lake. */ + cpu = "cooperlake"; + CHECK___builtin_cpu_is ("cooperlake"); + cpu_model->__cpu_subtype = INTEL_COREI7_COOPERLAKE; + } + else if (has_cpu_feature (cpu_model, cpu_features2, + FEATURE_AVX512VNNI)) { /* Cascade Lake. */ cpu = "cascadelake"; |