public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104271] New: 538.imagick_r run-time at -Ofast -march=native regressed by 26% on Intel Cascade Lake server CPU
@ 2022-01-28 17:12 jamborm at gcc dot gnu.org
  2022-01-31  8:11 ` [Bug target/104271] [12 Regression] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: jamborm at gcc dot gnu.org @ 2022-01-28 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104271
           Summary: 538.imagick_r run-time at -Ofast -march=native
                    regressed by 26% on Intel Cascade Lake server CPU
           Product: gcc
           Version: 12.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
            Target: x86_64-linux

On our Intel Cascade Lake server CPU, the benchmark 538.imagick_r from
the SPEC 2017 FPrate suite is 26% slower when built with GCC 12 using
options -Ofast -march=native than when built with GCC 11 with the same
options.

I have bisected the issue to r12-2549-g872da9a6f664a0:

  872da9a6f664a06d73c987aa0cb2e5b830158a10 is the first bad commit
  commit 872da9a6f664a06d73c987aa0cb2e5b830158a10
  Author: liuhongt <hongtao.liu@intel.com>
  Date:   Fri Mar 26 10:56:47 2021 +0800

    Add the member integer_to_sse to processor_cost as a cost simulation for
movd/pinsrd. It will be used to calculate the cost of vec_construct.

    gcc/ChangeLog: 

            PR target/99881
            * config/i386/i386.h (processor_costs): Add new member
            integer_to_sse.
            * config/i386/x86-tune-costs.h (ix86_size_cost, i386_cost,
            i486_cost, pentium_cost, lakemont_cost, pentiumpro_cost,
            geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost,
            bdver_cost, znver1_cost, znver2_cost, znver3_cost,
            btver1_cost, btver2_cost, btver3_cost, pentium4_cost,
            nocona_cost, atom_cost, atom_cost, slm_cost, intel_cost,
            generic_cost, core_cost): Initialize integer_to_sse same value
            as sse_op.
            (skylake_cost): Initialize integer_to_sse twice as much as sse_op.
            * config/i386/i386.c (ix86_builtin_vectorization_cost):
            Use integer_to_sse instead of sse_op to calculate the cost of
            vec_construct.


It is very likely that the problem is a load-to-store-forwarding stall
issue and so related to PR 80689 but the commit makes it either more
frequent or much worse.

Sorry for reporting this so late, unfortunately we do not benchmark
this class of CPUs periodically.  We do not see the problem on any of
the AMD Zens or Intel Kabylake (client) CPUs.


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)

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-06-07  7:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 17:12 [Bug target/104271] New: 538.imagick_r run-time at -Ofast -march=native regressed by 26% on Intel Cascade Lake server CPU jamborm at gcc dot gnu.org
2022-01-31  8:11 ` [Bug target/104271] [12 Regression] " rguenth at gcc dot gnu.org
2022-01-31  9:08 ` marxin at gcc dot gnu.org
2022-02-07  1:31 ` crazylht at gmail dot com
2022-02-07 18:10 ` jamborm at gcc dot gnu.org
2022-02-08  2:49 ` crazylht at gmail dot com
2022-03-23 12:37 ` rguenth at gcc dot gnu.org
2022-03-23 16:17 ` jamborm at gcc dot gnu.org
2022-03-24  8:34 ` lili.cui at intel dot com
2022-03-29  6:48 ` lili.cui at intel dot com
2022-03-29 10:39 ` rguenth at gcc dot gnu.org
2022-04-15 11:04 ` lili.cui at intel dot com
2022-05-06  8:32 ` [Bug target/104271] [12/13 " jakub at gcc dot gnu.org
2022-11-28  3:24 ` lili.cui at intel dot com
2023-05-08 12:23 ` [Bug target/104271] [12 " rguenth at gcc dot gnu.org
2023-06-07  2:07 ` lili.cui at intel dot com
2023-06-07  7:02 ` sjames at gcc dot gnu.org
2023-06-07  7:14 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).