AMD AOCC 4.0 vs. GCC vs. LLVM Clang Compiler Benchmarks On Zen 4

Written by Michael Larabel in Software on 18 November 2022 at 10:42 AM EST. Page 1 of 7. 10 Comments.

Last week when launching the AMD EPYC 9004 "Genoa" processors, AMD released AOCC 4.0 as the newest version of their optimizing C/C++ compiler that now supports their Zen 4 micro-architecture. Last week I ran some initial AOCC 4.0 benchmarks and this LLVM/Clang downstream was looking rather favorable in relation to upstream LLVM/Clang, while since then I've been able to conduct more thorough benchmarks across a wide variety of C/C++ open-source workloads. Here is that more extensive round of AOCC 4.0 benchmarking against the open-source LLVM/Clang and AOCC compilers.

For today's AOCC 4.0 benchmarking comparison the following compilers were tested:

- AOCC 4.0 as the new Znver4 release of the AMD Optimizing C/C++ Compiler and derived from LLVM Clang 14 upstream.

- GCC 12.2 as the current stable release of the GNU Compiler Collection. There is no Zen 4 specific work in GCC 12 but obviously AVX-512 support and the other instructions have been supported for years by the GNU Compiler Collection.

- GCC 13.0.0 as the current development state ahead of next year's GCC 13.1 stable release. GCC 13 Git as of this week was used. GCC 13 recently landed initial Znver4 enablement but currently making use of the cost/tuning tables from Zen 3. There is more Znver4 work ahead albeit not yet landed.

- LLVM Clang 14.0.6 as available on Ubuntu 22.10.

- LLVM Clang 15.0.2 using the LLVM.org APT repository for the latest compiler release. Upstream LLVM/Clang even with 16 Git still lacks any Znver4 enablement patches. As of this morning, there still are no "znver4" patches pending in the LLVM review queue either.

With all of these tested compilers, the CFLAGS/CXXFLAGS were maintained the same to target the native ISA of the processor, -O3 optimization levels, and also enabling link-time optimizations (LTO) in the name of an aggressive performance comparison.

AMD AOCC 4.0 Benchmarks

Due to my lone AMD EPYC 9004 "Genoa" server at the moment being busy running other benchmarks, this round of Zen 4 AOCC benchmarking was done using an AMD Ryzen 9 7950X desktop processor. The 16-core Zen 4 desktop CPU was running Ubuntu 22.10 with a Linux 6.1 Git kernel build.


Related Articles