https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113600
Bug ID: 113600 Summary: 525.x264_r run-time regresses by 8% with PGO -Ofast -march=znver4 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org CC: liuhongt at gcc dot gnu.org Blocks: 26163 Target Milestone: --- Host: x86_64-linux-gnu Target: x86_64-linux-gnu With profile-feedback, -Ofast and -march=native on an AMD Zen 4, there is a recent 8% regression: https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=979.377.0&plot.1=966.377.0& With both PGO and LTO, the situation is similar (6%): https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=977.377.0&plot.1=958.377.0& On a Zen3 machine, there is a 2% bump around the same time: https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=900.377.0&plot.1=473.377.0& I have bisected the (non-LTO) Zen 4 case to commit r14-5603-g2b59e2b4dff421: 2b59e2b4dff42118fe3a505f07b9a6aa4cf53bdf is the first bad commit commit 2b59e2b4dff42118fe3a505f07b9a6aa4cf53bdf Author: liuhongt <hongtao....@intel.com> Date: Thu Nov 16 18:38:39 2023 +0800 Support reduc_{plus,xor,and,ior}_scal_m for vector integer mode. BB vectorizer relies on the backend support of .REDUC_{PLUS,IOR,XOR,AND} to vectorize reduction. gcc/ChangeLog: PR target/112325 * config/i386/sse.md (reduc_<code>_scal_<mode>): New expander. (REDUC_ANY_LOGIC_MODE): New iterator. (REDUC_PLUS_MODE): Extend to VxHI/SI/DImode. (REDUC_SSE_PLUS_MODE): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr112325-1.c: New test. * gcc.target/i386/pr112325-2.c: New test. 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)