AMD Zen 3 Support Published For The LLVM Clang Compiler

Written by Michael Larabel in LLVM on 8 December 2020 at 06:05 AM EST. 1 Comment
LLVM
After Zen 3 support was sent out and merged into GCC 11 last week, the LLVM Clang compiler support has now been published for this newest member of the AMD Zen family.

The LLVM/Clang equivalent to last week's GCC enablement patch is now under review. The LLVM patch introduces the -march=znver3 target (and wires up the -march=native support). But like the GCC support is currently basic in that it flips on the now-supported instructions but doesn't yet have any optimized cost tables / scheduler model for helping to generate optimized code that will really roar on Zen 3... Those optimizations to the Znver3 target are expected in the coming months.

On top of Zen 2, the new instructions present with Zen 3 include: INVPCID (Invalidate Process-Context Identifier), PKU (Memory Protection Keys), VAES (Vector AES), VPCLMULQDQ (Carry-Less Multiplication Quadword), SNP (Secure Nested Paging), INVLPGB (Invalidate TLB with Broadcast), and TLBSYNC (TLB Synchronization).

The new Znver3 target for LLVM is currently being reviewed but there is sufficient time still that it should land for the LLVM Clang 12 release due out around March. We'll see though in time for that release whether any of the optimizations for Zen 3 are published.


Coming out later today I do have the initial GCC Znver3 benchmarks to publish along with other compiler optimization levels on Ryzen 5000 series hardware.
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