[PATCH] D21193: [cpu-detection] Return amdfam10 for all subtypes. Address Bug 28067.

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 15:04:14 PDT 2016


asbirlea updated this revision to Diff 60248.
asbirlea added a comment.

There is support in the x86 backend for barcelona, gcc's options include it and all uses I found test for it.
For all other subtypes the assumed return value is amdfam10.
So, keep barcelona subtype and return amdfam10 for all others (this can be extended further when support for the other subtypes is added).


http://reviews.llvm.org/D21193

Files:
  lib/Support/Host.cpp

Index: lib/Support/Host.cpp
===================================================================
--- lib/Support/Host.cpp
+++ lib/Support/Host.cpp
@@ -869,16 +869,9 @@
         return "athlon";
       }
     case AMDFAM10H:
-      switch (Subtype) {
-      case AMDFAM10H_BARCELONA:
-        return "amdfam10-barcelona";
-      case AMDFAM10H_SHANGHAI:
-        return "amdfam10-shanghai";
-      case AMDFAM10H_ISTANBUL:
-        return "amdfam10-istanbul";
-      default:
-        return "amdfam10";
-      }
+      if(Subtype == AMDFAM10H_BARCELONA)
+        return "barcelona";
+      return "amdfam10";
     case AMDFAM14H:
       return "btver1";
     case AMDFAM15H:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21193.60248.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160609/aa6e8b63/attachment.bin>


More information about the llvm-commits mailing list