[compiler-rt] e972bdb - [X86] Add detection for more Tremont models (#67150)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 03:26:06 PDT 2023
Author: libenc
Date: 2023-09-26T18:26:02+08:00
New Revision: e972bdba7009e63c6372f65446ff3c224c786758
URL: https://github.com/llvm/llvm-project/commit/e972bdba7009e63c6372f65446ff3c224c786758
DIFF: https://github.com/llvm/llvm-project/commit/e972bdba7009e63c6372f65446ff3c224c786758.diff
LOG: [X86] Add detection for more Tremont models (#67150)
Fix the issue that only the server series Tremont processors (Snow Ridge
& Elkhart Lake) can be detected as Tremont, while the client series
(Jasper Lake & Lakefield) will be guessed as Goldmont.
Noted that Lakefield is missing some features compare to other Tremont
processors, but those features are also missing on `FeatureTremont`,
which shouldn't be a problem. Those features are `waitpkg`, `movdiri`
and `movdir64b`.
Added:
Modified:
compiler-rt/lib/builtins/cpu_model.c
llvm/lib/TargetParser/Host.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c
index 6a0cc8f7a402dad..246025ba5ab8923 100644
--- a/compiler-rt/lib/builtins/cpu_model.c
+++ b/compiler-rt/lib/builtins/cpu_model.c
@@ -553,6 +553,9 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
*Type = INTEL_GOLDMONT_PLUS;
break;
case 0x86:
+ case 0x8a: // Lakefield
+ case 0x96: // Elkhart Lake
+ case 0x9c: // Jasper Lake
CPU = "tremont";
*Type = INTEL_TREMONT;
break;
diff --git a/llvm/lib/TargetParser/Host.cpp b/llvm/lib/TargetParser/Host.cpp
index c79595295d1bd81..cdb1f72ae39b9fc 100644
--- a/llvm/lib/TargetParser/Host.cpp
+++ b/llvm/lib/TargetParser/Host.cpp
@@ -913,6 +913,9 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model,
*Type = X86::INTEL_GOLDMONT_PLUS;
break;
case 0x86:
+ case 0x8a: // Lakefield
+ case 0x96: // Elkhart Lake
+ case 0x9c: // Jasper Lake
CPU = "tremont";
*Type = X86::INTEL_TREMONT;
break;
More information about the llvm-commits
mailing list