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

            Bug ID: 124114
           Summary: 7% slowdown of pelbench on Zen{1,4} since
                    r16-7431-ge55de74d50d236
           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, rguenth at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-suse-linux
            Target: x86_64-suse-linux

As seen here

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

there was a 7% exec time slowdown of the perlbench SPEC 2006
benchmark when compiled with  -O2 -march=x86-64-v3 -g -flto=128 on a Zen4
machine. I bisected it to r16-7431-ge55de74d50d236.

e55de74d50d236db0472431fe242f3244e41b884 is the first bad commit
commit e55de74d50d236db0472431fe242f3244e41b884
Author: Richard Biener <[email protected]>
Date:   Tue Feb 10 09:46:08 2026 +0100

    tree-optimization/107690 - avoid creating un-analyzable loop exits

    The following adds a heuristic to ifcombine that avoids turning
    analyzable loop exits into unanalyzable ones.  This allows vectorizing
    the testcase in the PR again.  I've refrained from actually
    analyzing niters but instead used a cheaper heuristic.  I believe
    we'll only ever attempt to combine two ifs if they are in the same
    loop and if either both exit the loop or stay within.

            PR tree-optimization/107690
            * tree-ssa-ifcombine.cc (ifcombine_ifandif): Do not merge
            possibly analyzable exit conditions.

            * g++.dg/vect/vect-pr107690.cc: New testcase.

 gcc/testsuite/g++.dg/vect/vect-pr107690.cc | 16 ++++++++++++++++
 gcc/tree-ssa-ifcombine.cc                  | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/vect/vect-pr107690.cc
bisect found first bad commit

This is a regression against GCC 13/14. See the comparison
here:

https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=1110.10.0&plot.1=1128.10.0&plot.2=1122.10.0&plot.3=1104.10.0&plot.4=1144.10.0&plot.5=1101.10.0&;

There is also a different perlbench slowdown in the same timeframe (so probably
caused by the same commit):
4% Zen1 -O2 -march=native -g 

https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=291.10.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)

Reply via email to