GCC patch sharpens Zen misprediction cost, boosting Zen 5 SPEC CPU gains
An AMD engineer pushed a two-line patch to GCC that increases the branch misprediction cost for Zen 4 and Zen 5 by three in GCC’s cost tables, yielding about a 12% improvement on SPEC CPU 544.nab_r for Zen 5 and 9% for Zen 4 in -O3 -march=native -flto builds. The patch is under review and could be part of GCC 17, with potential backports to GCC 16.3. This highlights AMD’s ongoing upstreaming efforts and tuning of kernel/compiler targets ahead of launch for newer Zen generations.