Zhaoxin Finally Adding "Lujiazui" x86_64 CPU Tuning To GCC
Introduced back in 2019 by the VIA + Shanghai owned Zhaoxin was the ZX-E / KX-6000 series x86_64 processors. Finally in 2022 the proper GCC compiler tuning support has been published for these processors that are part of the "Lujiazui" microarchitecture.
Back in 2019 Zhaoxin upstreamed Linux kernel support for their hardware and then proceeded to work on their newer unreleased CPUs too (KX-7000). But the GCC compiler support never took priority even with the GNU Compiler Collection being widely used by x86_64 Linux distributions.
ZX-E / KX-6000 series "Lujiazui" with GCC. Due to being an x86_64 CPU the GCC compiler has worked with these processors, but the compiler has identified the Zhaoxin processors incorrectly and ultimately attributing them as an Intel Core 2 or i386 CPU. Today's patch not only correctly identifies the processor but also has the proper cost tables and tunings for the Lujiazui microarchitecture.
The Zhaoxin KX-6000 series formally launched in 2019 with up to eight x86_64 cores manufactured on a TSMC 16nm process. Meanwhile Zhaoxin has been working on a more competitive KX-7000 (ZX-F) series based on TSMC 7nm and with DDR5 and PCI Express 4.0 connectivity. The Zhaoxin KX-7000 series was supposed to be introduced in 2021 but we haven't heard much about it recently, presumably another COVID or supply chain related delay. In any event, today's GCC patch work is only for the KX-6000 / Lujiazui CPUs.
The enablement patch also allows GCC -march/-mtune value of "lujiazui" for specifically targeting this microarchitecture. GCC 12 is fast approaching release time so we'll see if the 1,158 line patch will still be added this cycle - we're in stage four development but this addition shouldn't risk regressing GCC so may still be permitted.