https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125800
Bug ID: 125800
Summary: [17 Regression] 4-7% slowdown of calculix on
Zen{3,4,5} since r17-1485-g9f8409f2e2c28f
Product: gcc
Version: 17.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: chenzhongyao.hit at gmail dot com
Blocks: 26163
Target Milestone: ---
Hi,
there were numerous performance regressions of the calculix SPEC 2006 benchmark
with various flags on various machines. I verified 4 of them, all of which
bisect to r17-1485-g9f8409f2e2c28f.
9f8409f2e2c28f64bf6a584bc81afcae0f084785 is the first bad commit
commit 9f8409f2e2c28f64bf6a584bc81afcae0f084785
Author: Zhongyao Chen <[email protected]>
Date: Wed Jun 3 20:44:59 2026 +0800
vect: Avoid external fallback while operand swap retry is possible
I think it's safe to say the rest is also caused by the same commit.
6% on znver3, -O2 -g -flto=128
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=469.170.0
6% on znver4, -O2 -g -flto=128
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=956.170.0
7% on znver4, -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.170.0
6% on znver4, -O2 -g -flto=128 with PGO
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=960.170.0
4% on znver4, -O2 -march=x86-64-v3 -g -flto=128 with PGO
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1109.170.0
6% on znver5, -O2 -g -flto=128
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1238.170.0
6% on znver5, -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.170.0
6% on znver5, -O2 -g -flto=128 with PGO
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1239.170.0
6% on znver5, -Ofast -march=native -g -flto=128 with PGO
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1283.170.0
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2026, 2k17, 2k and 2k6 and
95)