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

            Bug ID: 128962
           Summary: [17 Regression] 4-14% slowdown of exchange2_r on x86
                    since r17-6332-gc9609467230d5d
           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: yansendao at 126 dot com
            Blocks: 26163
  Target Milestone: ---

I am seeing numerous exec time slowdowns of SPEC 2017 exchange2_r:

Zen2 4% slowdown with -O2 -march=native (=znver2):
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=297.407.0

Zen3 5% slowdown with -O2 -march=native (=znver3):
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=472.407.0

Zen3 7% slowdown with -O2 -march=native (=znver3) -flto=128:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=462.407.0

Intel Ice Lake (3rd generation Xeon) 15% slowdown with -O2 -march=native
(=icelake-server) -flto=128:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=795.407.0

Intel Ice Lake (3rd generation Xeon) 13% slowdown with -O2 -march=native
(=icelake-server):
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=794.407.0

Intel Ice Lake (3rd generation Xeon) 13% slowdown with -O2 -flto=128:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=800.407.0

Zen4 6% slowdown with -O2 -march=x86-64-v3 -flto=128:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1102.407.0

Zen5 5% slowdown with -O2 -march=native (=znver5):
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1254.407.0

I reproduced 2 of the slowdowns, they bisect to r17-6332-gc9609467230d5d:

commit c9609467230d5d690be1bde0d00fa3b8e2652a3d
Author: Sendao Yan <[email protected]>
Date:   Mon Nov 16 15:47:19 2026 -0700

    [PATCH v8 2/3] tree-optimization/128102 - lower switches after the late
jump threading


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