LLVM Lands Very Basic Support For AMD Zen 3 CPUs
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.