[compiler-rt] 0e6c931 - [X86] Add cooperlake detection to _cpu_indicator_init.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 21 13:03:46 PDT 2020
Author: Craig Topper
Date: 2020-06-21T13:02:33-07:00
New Revision: 0e6c9316d4c532ba1a024bc0ea552a0b866df4f1
URL: https://github.com/llvm/llvm-project/commit/0e6c9316d4c532ba1a024bc0ea552a0b866df4f1
DIFF: https://github.com/llvm/llvm-project/commit/0e6c9316d4c532ba1a024bc0ea552a0b866df4f1.diff
LOG: [X86] Add cooperlake detection to _cpu_indicator_init.
libgcc has this enum encoding defined for a while, but their
detection code is missing. I've raised a bug with them so that
should get fixed soon.
Added:
Modified:
compiler-rt/lib/builtins/cpu_model.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c
index c9aa42b2e673..ce25227d0b3b 100644
--- a/compiler-rt/lib/builtins/cpu_model.c
+++ b/compiler-rt/lib/builtins/cpu_model.c
@@ -353,7 +353,9 @@ static void getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
// Skylake Xeon:
case 0x55:
*Type = INTEL_COREI7;
- if (testFeature(FEATURE_AVX512VNNI))
+ if (testFeature(FEATURE_AVX512BF16))
+ *Subtype = INTEL_COREI7_COOPERLAKE; // "cooperlake"
+ else if (testFeature(FEATURE_AVX512VNNI))
*Subtype = INTEL_COREI7_CASCADELAKE; // "cascadelake"
else
*Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512"
More information about the llvm-commits
mailing list