Skip to content

Commit c8c6bdc

Browse files
committed
Support Intel Sapphire Rapids
Minimum LLVM version: 12 Ref llvm/llvm-project@e02d081
1 parent d7b391d commit c8c6bdc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/processor_x86.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ enum class CPU : uint32_t {
7979
intel_corei7_icelake_client,
8080
intel_corei7_icelake_server,
8181
intel_corei7_tigerlake,
82+
intel_corei7_sapphirerapids,
8283
intel_knights_landing,
8384
intel_knights_mill,
8485

@@ -209,6 +210,9 @@ constexpr auto icelake = cannonlake | get_feature_masks(avx512bitalg, vaes, avx5
209210
constexpr auto icelake_server = icelake | get_feature_masks(pconfig, wbnoinvd);
210211
constexpr auto tigerlake = icelake | get_feature_masks(avx512vp2intersect, movdiri,
211212
movdir64b, shstk);
213+
constexpr auto sapphirerapids = icelake_server |
214+
get_feature_masks(amx_tile, amx_int8, amx_bf16, avx512bf16, serialize, cldemote, waitpkg,
215+
ptwrite, tsxldtrk, enqcmd, shstk, avx512vp2intersect, movdiri, movdir64b);
212216

213217
constexpr auto k8_sse3 = get_feature_masks(sse3, cx16);
214218
constexpr auto amdfam10 = k8_sse3 | get_feature_masks(sse4a, lzcnt, popcnt, sahf);
@@ -260,6 +264,8 @@ static constexpr CPUSpec<CPU, feature_sz> cpus[] = {
260264
Feature::icelake_server},
261265
{"tigerlake", CPU::intel_corei7_tigerlake, CPU::intel_corei7_icelake_client, 100000,
262266
Feature::tigerlake},
267+
{"sapphirerapids", CPU::intel_corei7_sapphirerapids, CPU::intel_corei7_icelake_server, 120000,
268+
Feature::sapphirerapids},
263269

264270
{"athlon64", CPU::amd_athlon_64, CPU::generic, 0, Feature::generic},
265271
{"athlon-fx", CPU::amd_athlon_fx, CPU::generic, 0, Feature::generic},
@@ -419,6 +425,10 @@ static CPU get_intel_processor_name(uint32_t family, uint32_t model, uint32_t br
419425
case 0x8d:
420426
return CPU::intel_corei7_tigerlake;
421427

428+
// Sapphire Rapids
429+
case 0x8f:
430+
return CPU::intel_corei7_sapphirerapids;
431+
422432
case 0x1c: // Most 45 nm Intel Atom processors
423433
case 0x26: // 45 nm Atom Lincroft
424434
case 0x27: // 32 nm Atom Medfield

0 commit comments

Comments
 (0)