From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] middle-end/113622 - handle store with variable index to register
Date: Mon, 29 Jan 2024 13:21:02 +0100 [thread overview]
Message-ID: <ZbeYLiKxlcBzeDk0@tucnak> (raw)
In-Reply-To: <ZbeXTGAvXVh8JpQa@tucnak>
On Mon, Jan 29, 2024 at 01:17:16PM +0100, Jakub Jelinek wrote:
> On Mon, Jan 29, 2024 at 01:05:51PM +0100, Richard Biener wrote:
> > The following implements storing to a non-MEM_P with a variable
> > offset. We usually avoid this by forcing expansion to memory but
> > this doesn't work for hard register variables. The solution is
> > to spill and operate on the stack.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?
> >
> > I realize the flow is a bit awkward, but short of duplicating a lot
> > of code I can't see a better way. Forcing some lowering on GIMPLE
> > (creating the copy there) might be another away. But then we
> > could possibly lower the whole vector indexing in a different way
> > in the first place ...
> >
> > Thanks,
> > Richard.
> >
> > PR middle-end/113622
> > * expr.cc (expand_assignment): Spill hard registers if
> > we index them with a variable offset.
> >
> > * gcc.target/i386/pr113622-2.c: New testcase.
> > * gcc.target/i386/pr113622-3.c: Likewise.
>
> Ok, thanks.
Actually, better to do
gcc_assert (VAR_P (tem) && DECL_HARD_REGISTER (tem));
Again, nothing guarantees tem is a VAR_DECL. Though, with tree checking
it would either ICE for DECL_HARD_REGISTER (tem) being false on a VAR_DECL,
or in checking on tem not being a VAR_DECL. But say with release checking
it will do a weird thing.
Jakub
next prev parent reply other threads:[~2024-01-29 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <04221.124012907112600441@us-mta-365.us.mimecast.lan>
2024-01-29 12:17 ` Jakub Jelinek
2024-01-29 12:21 ` Jakub Jelinek [this message]
2024-01-29 12:05 Richard Biener
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=ZbeYLiKxlcBzeDk0@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).