Skip to content

Commit

Permalink
Quick hack for Zen 4, more Zen 3 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
xddxd authored and kd-11 committed Sep 26, 2022
1 parent e8f2aa0 commit bc7b2ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Support/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,15 @@ getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model,
}
break;
case 25:
if (testFeature(X86::FEATURE_AVX512VBMI2)) {
CPU = "icelake-client";
*Type = X86::INTEL_COREI7;
*Subtype = X86::INTEL_COREI7_ICELAKE_CLIENT;
break; // Treat Zen 4 as Ice Lake for AVX512
}
CPU = "znver3";
*Type = X86::AMDFAM19H;
if (Model <= 0x0f) {
if (Model <= 0x0f || Model == 0x21) {
*Subtype = X86::AMDFAM19H_ZNVER3;
break; // 00h-0Fh: Zen3
}
Expand Down

0 comments on commit bc7b2ed

Please sign in to comment.