Skip to content

Commit

Permalink
[X86] Add detection for more Tremont models (#67150)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
libenc committed Sep 26, 2023
1 parent d7195c5 commit e972bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler-rt/lib/builtins/cpu_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions llvm/lib/TargetParser/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e972bdb

Please sign in to comment.