public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Greg McGary <gkm@rivosinc.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]
Date: Wed, 17 Jan 2024 20:53:36 -0700	[thread overview]
Message-ID: <CACe4iF38z4TH9CJWunWJ1ggrGr915YFQEM6CzgkAFjxOcW3N8Q@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc16p6EXi0KNXUtLpJkEaDXZajzGLQ8BeKpj8aRy3z3weg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

On Tue, Jan 16, 2024 at 11:44 PM Richard Biener <richard.guenther@gmail.com>
wrote:

> > On Tue, Jan 16, 2024 at 11:20 PM Greg McGary <gkm@rivosinc.com> wrote:

> > >

> > > The sign bit of a sign-extending load cannot be known until runtime,

> > > so don't attempt to simplify it in the combiner.

> >
> It feels like this papers over an issue downstream?

While the code comment is true, perhaps it obscures the primary intent,
which is recognition that the pattern (SIGN_EXTEND (mem ...) ) is destined
to expand into a single memory-load instruction and no simplification is
possible, so why waste time with further analysis or transformation? There
are plenty of other conditions that also short circuit to "do nothing" and
this seems just as straightforward as those others. Efforts to catch this
further downstream add gratuitous complexity.

G

  reply	other threads:[~2024-01-18  3:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 22:19 Greg McGary
2024-01-17  6:44 ` Richard Biener
2024-01-18  3:53   ` Greg McGary [this message]
2024-01-18 16:24     ` Jeff Law
2024-02-02  1:24       ` Greg McGary
2024-02-02  5:24         ` Jeff Law
2024-02-02 22:48           ` Greg McGary
2024-02-05  4:58             ` Jeff Law
2024-02-08  5:36               ` Greg McGary
2024-01-17  7:56 ` YunQiang Su

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=CACe4iF38z4TH9CJWunWJ1ggrGr915YFQEM6CzgkAFjxOcW3N8Q@mail.gmail.com \
    --to=gkm@rivosinc.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).