[llvm] c5f7a32 - [X86] Add AMD Llano family detection (#111312)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 08:33:30 PDT 2024


Author: RipleyTom
Date: 2024-10-07T08:33:26-07:00
New Revision: c5f7a32356fef48bbd075edfedec80142e8106b6

URL: https://github.com/llvm/llvm-project/commit/c5f7a32356fef48bbd075edfedec80142e8106b6
DIFF: https://github.com/llvm/llvm-project/commit/c5f7a32356fef48bbd075edfedec80142e8106b6.diff

LOG: [X86] Add AMD Llano family detection (#111312)

Very simple one liner, adds the missing detection for the Llano family
which is essentially a refreshed K10:
Documentation of the family id:
https://en.wikichip.org/wiki/amd/cpuid#Family_18_.2812h.29
Documentation that it fits into amdfam10:
https://en.wikipedia.org/wiki/AMD_10h#12h

Added: 
    

Modified: 
    compiler-rt/lib/builtins/cpu_model/x86.c
    llvm/lib/TargetParser/Host.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/cpu_model/x86.c b/compiler-rt/lib/builtins/cpu_model/x86.c
index dbe6094541f63d..23f8fa3e1fd490 100644
--- a/compiler-rt/lib/builtins/cpu_model/x86.c
+++ b/compiler-rt/lib/builtins/cpu_model/x86.c
@@ -649,6 +649,7 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family,
     CPU = "k8";
     break;
   case 16:
+  case 18:
     CPU = "amdfam10";
     *Type = AMDFAM10H; // "amdfam10"
     switch (Model) {

diff  --git a/llvm/lib/TargetParser/Host.cpp b/llvm/lib/TargetParser/Host.cpp
index 6e175f25c4882c..6e1f4b6052bda8 100644
--- a/llvm/lib/TargetParser/Host.cpp
+++ b/llvm/lib/TargetParser/Host.cpp
@@ -1050,6 +1050,7 @@ static const char *getAMDProcessorTypeAndSubtype(unsigned Family,
     CPU = "k8";
     break;
   case 16:
+  case 18:
     CPU = "amdfam10";
     *Type = X86::AMDFAM10H; // "amdfam10"
     switch (Model) {


        


More information about the llvm-commits mailing list