AMD Sends Out Basic Zen 4 "Znver4" Enablement For The GCC Compiler

Written by Michael Larabel in AMD on 16 October 2022 at 02:15 PM EDT. 9 Comments
AMD --
Following last month's introduction of the Ryzen 7000 series "Zen 4" processors, AMD has finally posted the code providing initial enablement for the Zen 4 CPUs with the GNU Compiler Collection (GCC).

AMD has posted the "basic enablement patch" for the new Znver4 target with the GCC compiler. While coming post-launch, sadly this is indeed basic: it's still carrying over the same tunings as Zen 3 without any update cost tables for instruction latency differences, etc. Hopefully we will see them improve their Znver4 target with time but sadly refining the Zen compiler targets particularly with GCC has been a rare occurrence.

So what this amounts to at this point is getting -march=native working for Zen 4, honoring -march=znver4, and then over the Znver3 target just flipping on AVX512F, AVX512DQ, AVX512IFMA, AVX512CD, AVX512BW, AVX512VL, AVX512BF16, AVX512VBMI, AVX512VBMI2, GFNI, AVX512VNNI, AVX512BITALG, and AVX512VPOPCNTDQ.


For now the initial Znver4 GCC enablement is on the mailing list and looking to get it into GCC 13 trunk for that feature release due out around next April. Hopefully before then they manage to get out the optimized cost tables / tunings and any other compiler-side optimizations for Zen 4.

Sadly this is yet another example of the new GCC compiler support from AMD coming rather tardy post-launch and given the compiler release schedules means this Znver4 support won't be widespread in released versions of compilers and Linux distributions until next year. Meanwhile Intel generally gets their new CPU compiler support added to GCC (and Clang) usually years ahead of schedule especially in cases of major ISA additions. This same week as AMD posting Zen 4 for GCC saw Intel with the GCC patches for Meteor Lake and Sierra Forest.
Related News
About The Author
Author picture

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