https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123606
Bug ID: 123606
Summary: [16 Regression] 5-8% slowdown of mcf on x86 since
r16-6679-g3ebe697f32197e
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jmelcr at gcc dot gnu.org
CC: pheeck at gcc dot gnu.org, pinskia at gcc dot gnu.org
Blocks: 26163
Target Milestone: ---
As seen here
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1238.60.0
there was a 5-8% exec time slowdown of the mcf SPEC 2006
benchmark when compiled with -O2 -g -flto=128 on a Zen 5
machine. I bisected it to r16-6679-g3ebe697f32197e.
3ebe697f32197ec4a429fbf8dd9cce3155c0c9ba is the first bad commit
commit 3ebe697f32197ec4a429fbf8dd9cce3155c0c9ba
Author: Andrew Pinski <[email protected]>
Date: Fri Jan 9 02:02:01 2026 -0800
cfgcleanup: Protect latches always [PR123417]
There were also these mcf slowdowns in the same timeframe (so probably
caused by the same commit):
7% Zen5 -O2 -g -flto=128 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1282.60.0
5% Zen4 -O2 -g -flto=128 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1100.60.0
5% Zen4 -O2 -g -flto=128
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=956.60.0
6% Intel Ice Lake (3rd generation Xeon) -O2 -g -flto=16
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=799.60.0
This is likely not a regression against previous GCC versions. We don't have a
lot of data, but but this regression puts GCC 16 about on par with GCC 15/14.
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=938.60.0&plot.1=999.60.0&plot.2=971.60.0&plot.3=1010.60.0&plot.4=1146.60.0&plot.5=956.60.0&
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=802.60.0&plot.1=838.60.0&plot.2=821.60.0&plot.3=903.60.0&plot.4=1084.60.0&plot.5=1175.60.0&plot.6=799.60.0&
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)