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: Wed, 10 Apr 2024 08:52:06 +0000	[thread overview]
Message-ID: <bug-114591-4-4EuchL5ayZ@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 #9 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---

> 
> 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.

(insn 7 6 12 2 (set (reg:HI 101 [ _5 ])
        (subreg:HI (reg:SI 98 [ v1.0_1 ]) 0)) "test.c":6:12 86
{*movhi_internal}
     (expr_list:REG_DEAD (reg:SI 98 [ v1.0_1 ])
        (nil)))

May be we should reduce cost from simple move instruction(with subreg?) when
calculating total_cost, since it's probably be eliminated by later rtl
optimization.

  parent reply	other threads:[~2024-04-10  8:52 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
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 [this message]
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-4EuchL5ayZ@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).