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

            Bug ID: 128022
           Summary: [16/17 Regression] 1.6x slowdown of SPEC CPU2026
                    766.femflow_r on Zen5 with PGO
           Product: gcc
           Version: 16.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vekumar at gcc dot gnu.org
  Target Milestone: ---

Profile-guided optimization makes SPEC CPU2026 766.femflow_r substantially
slower than -O3.  The slowdown is in IPA-SRA clones of

  dealii::operator*(const double&, const dealii::VectorizedArray<double, 8>&)

At -O3 those clones are unrolled and vectorized (SSE2 mulpd).  With
-fprofile-use, most of the clones become a 64-byte stack copy and a scalar
mulsd loop. Recompiling the profile-use pass with -fno-ipa-sra removes the
clones and turns the PGO slowdown into a speedup.

How to reproduce
----------------
Licensed SPEC CPU2026 tree required.  No source edits.

  default=base:
     OPTIMIZE = -g -O3
  default=peak:
     OPTIMIZE = -g -O3
     PASS1_FLAGS = -fprofile-generate
     PASS2_FLAGS = -fprofile-use

runcpu -c <cfg> -n 1 -C 1 --size=train --tune=base,peak 766.femflow_r

Reply via email to