public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <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: Thu, 11 Apr 2024 06:33:21 +0000 [thread overview] Message-ID: <bug-114591-4-sqXhBuoRzS@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 #12 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- short a; short c; short d; void foo (short b, short f) { c = b + a; d = f + a; } foo(short, short): addw a(%rip), %di addw a(%rip), %si movw %di, c(%rip) movw %si, d(%rip) ret this one is bad since gcc10.1 and there's no subreg, The problem is if the operand is used by more than 1 insn, and they all support separate m constraint, mem_cost is quite small(just 1, reg move cost is 2), and this makes RA more inclined to propagate memory across insns. I guess RA assumes the separate m means the insn only support memory_operand? 961 if (op_class == NO_REGS) 962 /* Although we don't need insn to reload from 963 memory, still accessing memory is usually more 964 expensive than a register. */ 965 pp->mem_cost = frequency; 966 else
next prev parent reply other threads:[~2024-04-11 6:33 UTC|newest] Thread overview: 20+ 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 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 [this message] 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 2024-06-20 9:15 ` [Bug target/114591] [12/13/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-114591-4-sqXhBuoRzS@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).