[llvm] Add Apple M4 host detection (PR #117530)

Mads Marquart via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 10:07:28 PST 2024


================
@@ -1494,15 +1539,24 @@ StringRef sys::getHostCPUName() {
     return "apple-a12";
   case CPUFAMILY_ARM_LIGHTNING_THUNDER:
     return "apple-a13";
-  case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
+  case CPUFAMILY_ARM_FIRESTORM_ICESTORM: // A14 / M1
     return "apple-m1";
-  case CPUFAMILY_ARM_BLIZZARD_AVALANCHE:
+  case CPUFAMILY_ARM_BLIZZARD_AVALANCHE: // A15 / M2
     return "apple-m2";
-  case CPUFAMILY_ARM_EVEREST_SAWTOOTH:
+  case CPUFAMILY_ARM_EVEREST_SAWTOOTH: // A16
+  case CPUFAMILY_ARM_IBIZA:            // M3
+  case CPUFAMILY_ARM_PALMA:            // M3 Max
+  case CPUFAMILY_ARM_COLL:             // A17
----------------
madsmtm wrote:

But why not? [The Wikipedia article](https://en.wikipedia.org/wiki/Apple_M3) (which of course isn't a reliable resource) lists Apple M3 as a variant of Apple A17 Pro?

In any case, `apple-a16` and `apple-a17` don't seem to have any functional differences in the source code (yet), so the point is perhaps a bit moot anyways?

https://github.com/llvm/llvm-project/pull/117530


More information about the llvm-commits mailing list