[PATCH] D134658: Fix -mcpu=native on non-macos Apple platforms

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 16:30:10 PDT 2022


keith added a comment.

nice! sorry I definitely didn't consider this case, and forgot folks at apple were doing this



================
Comment at: llvm/lib/Support/Host.cpp:1370
     // Default to the newest CPU we know about.
     return "apple-m1";
+#elif defined(__arm64e__)
----------------
we actually have a m2 definition now https://github.com/llvm/llvm-project/commit/677da09d0259d7530d32e85cb561bee15f0066e2

can we bump to that? Unless we're missing a constant above, but I assume we do assuming that m1 & a14 are interchange?

If you'd like I'm happy to do that in a later change though!


================
Comment at: llvm/lib/Support/Host.cpp:1374
+    // Apple CPU to support that ISA.
+    return "apple-a12";
+#endif
----------------
I don't fully understand the comment here, should we not be defaulting to a newer chip like a13 / a14 instead? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134658/new/

https://reviews.llvm.org/D134658



More information about the llvm-commits mailing list