Apple M2 Support Added To Upstream LLVM Along With The A15, A16

Written by Michael Larabel in LLVM on 23 September 2022 at 11:58 AM EDT. 33 Comments
Upstream LLVM has added the compiler CPU targets for the Apple M2, A15, and A16 SoCs.

Apple compiler engineer Tim Northover has contributed the Apple M2 / A15 / A16 CPU targets to the upstream code-base for LLVM/Clang. He commented in the commit:
They're roughly ARMv8.6. This works in the .td file, but in AArch64TargetParser.def, marking them v8.6 brings in support for the SM4 cryptographic hash and we don't actually have that. So TargetParser side they're marked as v8.5, with the extra features (BF16 and I8MM added manually).

Finally, A16 supports the HCX extension in addition to v8.6. This has no TargetParser implications.

Now with the new "apple-a15", "apple-a16", and "apple-m2" targets it's much easier targeting the capabilities of these respective CPU cores if aiming for optimal instruction targeting.

More details within this commit for those interested. This addition was made to LLVM Git for the LLVM/Clang 16.0 release that will debut as stable around next March.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week