GCC Patch Adjusting AMD Zen 5 Misprediction Cost Nets 12% Win in Benchmark

Alephinitesimal1 pts0 comments

GCC Patch Adjusting AMD Zen 5 Misprediction Cost Nets 12% Win In Benchmark - Phoronix

Articles & Reviews

News Archive

Forums

Premium Ad-Free<br>Contact

Popular Categories

Close

Articles & Reviews

News Archive

Forums

Premium

Contact

Categories

Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals

GCC Patch Adjusting AMD Zen 5 Misprediction Cost Nets 12% Win In Benchmark

Written by Michael Larabel in AMD on 23 August 2026 at 06:56 AM EDT. 11 Comments

An AMD compiler engineer posted a patch on Saturday for the GNU Compiler Collection (GCC). The two-line patch adjusts the misprediction cost for Zen 4 and Zen 5 processors, which ends up yielding a 12% improvement in one SPEC CPU benchmark on Zen 5 and a 9% improvement on Zen 4.

Venkataramanan Kumar of AMD posted the straight-forward patch for bumping up the branch misprediction scale by three for both Zen 4 and Zen 5's cost tables within the GCC compiler. In doing so there is an observed 12% improvement for SPEC CPU's 544.nab_r on Zen 5 and 9% on Zen 4 for the "-O3 -march=native -flto" optimized build in catering to the respective CPUs.

It's possible and likely some other workloads may benefit as well from this adjustment to the branch misprediction cost but for testing purposes with compiler tuning it's commonly done against SPEC CPU.

The patch is out for review on the GCC mailing list. Assuming no issues are brought to light, which shouldn't be the case given the simplicity, it should be part of next year's GCC 17 feature release and potentially back-ported to the GCC 16.3 point release.

While AMD has been doing better at upstreaming their new CPU compiler targets earlier into the GCC and LLVM/Clang open-source compilers (AMD Zen 6 made it into GCC 16 last December), their cost table tuning is one area where they can still make more progress in profiling and tuning ahead of time rather than post-launch. The Znver5 and Znver6 targets in GCC, for example, are still largely relying on the same Znver4 cost table information with various adjustments typically coming months later. Given GCC's long release cycles, this ends up being unfortunate timing in many cases.

11 Comments

Tweet

AMD Posts Massive Patch Series For Enabling UALink In The Linux Kernel<br>Linux 7.3 Ready With CXL Type-2 Driver Support For AMD Solarflare NICs<br>New AMD Low-Power Core & Unified Intel/AMD CPU Core Type Handling In Linux 7.3<br>AMD Working On A New Backend For Improving ROCm Compute In QEMU/VMs<br>AMD Posts Massive 109 Patch Series For GFX 12.1 RAS Support On Friday Evening<br>AMD GAIA 0.23 Delivers Ability To Install/Run AI Agents From The Terminal

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.

Linus Torvalds Endures A Debug Session From Hell, "Enormously Helped" By AI<br>Longtime Linux CIFS/SMB3 Maintainer Passes Away<br>GNOME 51 Beta Released With Many Minor Improvements<br>Linux 7.2 Released With Faster I/O, New AMD & Intel Driver Improvements<br>Linux 7.3 Network Changes Merged But Developers "Completely Overwhelmed" Due To AI/LLMs<br>X.Org Server 26.1 RC1 Prepares For First Feature Release In Five Years<br>Two Very Exciting Memory Management Optimizations Going Into Linux 7.3<br>Specially Crafted NTFS File-System Image Allows Root Access On Linux With NTFS3 Driver

Linux 7.3 Better Protects Against Buggy EFI Firmware Taking Down The Rest Of User-Space

Linux 7.3 Delivers Graphics Driver Improvements From Old GPUs To Next-Gen Hardware

ReactOS Merges Support For Job Objects As Step To Running Modern Windows Apps

Linux 7.3 Makes Preparations Toward Upstreaming FAMFS File-System

GCC Patch Adjusting AMD Zen 5 Misprediction Cost Nets 12% Win In Benchmark

Longtime Linux CIFS/SMB3 Maintainer Passes Away

Redox OS Switches To EEVDF-Based Scheduler For 2.6x Throughput

Specially Crafted NTFS File-System Image Allows Root Access On Linux With NTFS3 Driver

AMD RDNA 4m Firmware Published For Linux Ahead Of Launch

NVK Vulkan Video Merged For Mesa 26.3

Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations.

Framework Laptop 16 With GeForce RTX 5070 12GB, One-Piece Keyboard & Haptic Touchpad

Intel Hyper Threading Performance On The Xeon 678X "Granite Rapids-WS"

AMD EPYC 9005 Series Memory Scaling Performance From 4 To 24 DDR5 RDIMMs

The CachyOS Performance vs. Other Linux Operating Systems On A $46k USD Workstation

ARCTIC Fan Controller: The Best Fan Controller For Linux...

linux patch cost misprediction benchmark compiler

Related Articles