public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114591] [12/13/14 Regression] register allocators introduce an extra load operation since gcc-12 Date: Wed, 10 Apr 2024 08:36:04 +0000 [thread overview] Message-ID: <bug-114591-4-2zRqzawkGv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114591-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114591 --- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> --- LRA starts with this: 5: r98:SI=[`v1'] REG_EQUIV [`v1'] 6: [`v2']=zero_extend(r98:SI) 7: r101:HI=r98:SI#0 REG_DEAD r98:SI 12: ax:HI=r101:HI REG_DEAD r101:HI 13: use ax:HI then decides that: Removing equiv init insn 5 (freq=1000) 5: r98:SI=[`v1'] REG_EQUIV [`v1'] and substitutes all follow-up usages of r98 with a memory access. In insn 6, we have: (mem/c:SI (symbol_ref:DI ("v1"))) while in insn 7 we have: (mem/c:HI (symbol_ref:DI ("v1"))) It looks that different modes of memory read confuse LRA to not CSE the read. IMO, if the preloaded value is later accessed in different modes, LRA should leave it. Alternatively, LRA should CSE memory accesses in different modes. Cc LRA expert ... oh, he already is in the loop.
next prev parent reply other threads:[~2024-04-10 8:36 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-04 18:57 [Bug rtl-optimization/114591] New: rtl-reload " absoler at smail dot nju.edu.cn 2024-04-04 19:03 ` [Bug target/114591] " pinskia at gcc dot gnu.org 2024-04-04 19:07 ` [Bug target/114591] [12/13/14 Regression] " pinskia at gcc dot gnu.org 2024-04-05 2:32 ` [Bug target/114591] [12/13/14 Regression] register allocators " law at gcc dot gnu.org 2024-04-08 15:02 ` jakub at gcc dot gnu.org 2024-04-10 7:51 ` ubizjak at gmail dot com 2024-04-10 8:17 ` liuhongt at gcc dot gnu.org 2024-04-10 8:30 ` liuhongt at gcc dot gnu.org 2024-04-10 8:36 ` ubizjak at gmail dot com [this message] 2024-04-10 8:40 ` ubizjak at gmail dot com 2024-04-10 8:47 ` ubizjak at gmail dot com 2024-04-10 8:52 ` liuhongt at gcc dot gnu.org 2024-04-10 9:07 ` ubizjak at gmail dot com 2024-04-10 9:12 ` liuhongt at gcc dot gnu.org 2024-04-11 6:33 ` liuhongt at gcc dot gnu.org 2024-04-11 6:54 ` ubizjak at gmail dot com 2024-04-11 7:08 ` pinskia at gcc dot gnu.org 2024-04-11 7:28 ` liuhongt at gcc dot gnu.org 2024-04-11 7:37 ` liuhongt 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-114591-4-2zRqzawkGv@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: linkBe 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).