https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125933

            Bug ID: 125933
           Summary: [17 Regression] 5% slowdown of exchange2_r on Zen5
                    since r17-1585-g4bcb92dcb23daa
           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: rguenth at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-suse-linux
            Target: x86_64-suse-linux
             Build: x86_64-suse-linux

As seen here

https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1253.407.0

there was a 5% exec time slowdown of the exchange2_r SPEC 2017
benchmark when compiled with -O2 -march=native -g -flto=128 on an Zen5
machine. I bisected it to r17-1585-g4bcb92dcb23daa.

4bcb92dcb23daa446bb930179a7e7a16b920720f is the first bad commit
commit 4bcb92dcb23daa446bb930179a7e7a16b920720f
Author: Richard Biener <[email protected]>
Date:   Mon Jun 15 11:29:08 2026 +0200

    Improve fold_plusminus_mult_expr for 64bit and larger types

This is a regression against GCC 16. See the comparison
here:

https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1278.407.0&plot.1=1335.407.0&plot.2=1308.407.0&plot.3=1365.407.0&plot.4=1567.407.0&plot.5=1253.407.0&;

There was also this exchange2_r slowdown in the same timeframe (so probably
caused by the same commit):

4% 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=1103.407.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)

Reply via email to