public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113847] [14 Regression] 10% slowdown of 462.libquantum on AMD Ryzen 7700X and Ryzen 7900X
Date: Mon, 12 Feb 2024 13:18:30 +0000	[thread overview]
Message-ID: <bug-113847-4-yOqRtXs2oO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113847-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can't confirm a regression (testing r14-8925-g1e3f78dbb328a2 with the
offending rev reverted vs bare).

462.libquantum  20720       61.9        335 S   20720       62.6        331 *
462.libquantum  20720       62.2        333 *   20720       61.9        335 S
462.libquantum  20720       62.4        332 S   20720       62.7        330 S

so the "best" run with the change is faster than the best run with it reverted
while the worst runs are the same.

There's only code-gen changes in quantum_bmeasure.part.0 and we can see
it's likely

{component_ref<node>,mem_ref<0B>,reg_3(D)}@.MEM_166 (0030)

vs

{component_ref<hash>,mem_ref<0B>,reg_3(D)}@.MEM_9 (0022)

where once the size is 256 and once 64.  The types are

 <record_type 0x7ffff6a753f0 quantum_reg BLK
    size <integer_cst 0x7ffff6c29138 type <integer_type 0x7ffff6c250a8
bitsizetype> constant 256>
    unit-size <integer_cst 0x7ffff6c29228 type <integer_type 0x7ffff6c25000
sizetype> constant 32>

vs.

 <pointer_type 0x7ffff6a813f0
    type <record_type 0x7ffff6a81348 quantum_reg_node TI
        size <integer_cst 0x7ffff6c0be10 constant 128>
        unit-size <integer_cst 0x7ffff6c0be28 constant 16>

the former is subsetted by a COMPONENT_REF to eventually

 <pointer_type 0x7ffff6e752a0
    type <record_type 0x7ffff6e751f8 quantum_reg_node VOID
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
        pointer_to_this <pointer_type 0x7ffff6e752a0>>
    unsigned DI

so we have basically MEM<ptr + off> vs. MEM<ptr>.member-with-off.

That's indeed a case where we maybe like to avoid applying this fix, but
maybe only when strict-aliasing is in effect.

  parent reply	other threads:[~2024-02-12 13:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09  9:24 [Bug target/113847] New: " fkastl at suse dot cz
2024-02-09 11:13 ` [Bug target/113847] " rguenth at gcc dot gnu.org
2024-02-10 17:04 ` fkastl at suse dot cz
2024-02-12  9:45 ` rguenth at gcc dot gnu.org
2024-02-12 13:18 ` rguenth at gcc dot gnu.org [this message]
2024-02-12 14:41 ` rguenth at gcc dot gnu.org
2024-02-12 14:43 ` rguenth at gcc dot gnu.org
2024-02-12 15:30 ` jamborm at gcc dot gnu.org
2024-03-07 20:40 ` law at gcc dot gnu.org
2024-05-07  7:45 ` [Bug target/113847] [14/15 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113847-4-yOqRtXs2oO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).