LLVM Lands Very Basic Support For AMD Zen 3 CPUs

Written by Michael Larabel in AMD on 25 October 2020 at 06:36 AM EDT. 7 Comments
AMD
While AMD has landed Znver3 support in GNU Binutils, the company hasn't yet sent out patches for either the GCC or LLVM/Clang compilers in setting up the Zen 3 target with its new instructions or optimized scheduling model / cost table. But a basic implementation has been merged to LLVM for allowing "-march=znver3" based on the limited public details thus far.

Merged to mainline LLVM 12 yesterday was a basic implementation allowing for -march=znver3 targeting that basically flips on the new instructions known to be supported by Zen 3. Beyond Zen 2, it flips on INVPCID, PKU, VAES, and VPCLMULQDQ. There are also a few other instructions supported by Zen 3 as outlined in this earlier article.

Besides not having all of the instructions wired up yet, there is no optimized scheduling model yet for Zen 3 and just re-using the existing Zen assets. Also, auto-detection for Zen 3 isn't yet wired up.

So this patch now in LLVM 12 will allow compiling code with -march=znver3 but it's incomplete.

The last I've heard is that AMD should be publishing their compiler patches in November, presumably around the time the Ryzen 5000 series processors begin shipping. That support should work its way into GCC 11 for release as stable in March~April while LLVM 12 should release in February~March.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week