Initial AMD Zen 4 "znver4" Support Merged Into GCC 13

Written by Michael Larabel in AMD on 21 October 2022 at 06:09 AM EDT. 2 Comments
AMD
Last Thursday AMD finally sent out the basic enablement patch for AMD Zen 4 "znver4" with the GCC compiler. Once again it was tardy with Ryzen 7000 series processors already shipping and sadly the cost tables (tuning) is still catering to Zen 3 rather than updated for Zen 4. While as of today this -march=znver4 support has been merged into GCC 13.


Unlike Intel that generally sends out their new GCC and LLVM/Clang compiler support well ahead of CPU launches (just this morning was enabling new instructions for Grand Ridge and Sierra Forest with GCC), the AMD timing for Zen compiler support has tended to be post-launch. With Zen 4 the Ryzen 7000 series processors have already been shipping for a month while at least this is out ahead of the EPYC "Genoa" and "Bergamo" processors. But given the annual release cadence of the GNU Compiler Collection, GCC 13 won't be out as stable until around next April and even longer before finding it picked up by various Linux distributions (e.g. Ubuntu 23.10). Besides this Znver4 enablement patch coming post-launch, it's also frustrating that it's incomplete in still carrying over the Zen 3 instruction cost table rather than being optimized yet for Zen 4. We'll see if/when the additional Zen 4 compiler tuning work comes about.


In any event, as of this commit a few minutes ago the GCC 13 compiler has this initial AMD Zen 4 support with -march=znver4 becoming available for those wanting to build optimized binaries for your Ryzen 7000 series desktop. The Znver4 target will flip on all of the new instructions with Zen 4, namely all the new AVX-512 extensions.

As of writing the AMD Zen 4 (znver4) enablement for the LLVM/Clang compiler has yet to be published but presumably it too will be coming soon.
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