public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>,
	'GCC Patches' <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Also preserve SUBREG_PROMOTED_VAR_P in expr.c's convert_move.
Date: Sat, 11 Sep 2021 09:17:30 -0600	[thread overview]
Message-ID: <190b78e0-32a5-d19a-ad31-00b0c1717d89@gmail.com> (raw)
In-Reply-To: <00a901d7a6ef$6b352ac0$419f8040$@nextmovesoftware.com>



On 9/11/2021 3:28 AM, Roger Sayle wrote:
> This patch catches another place in the middle-end where it's possible
> to preserve the SUBREG_PROMOTED_VAR_P annotation on a subreg to the
> benefit of later RTL optimizations.  This adds the same logic to
> expr.c's convert_move as recently added to convert_modes.
>
> On nvptx-none, the simple test program:
>
> short foo (char c) { return c; }
>
> currently generates three instructions:
>
> mov.u32 %r23, %ar0;
> cvt.u16.u32     %r24, %r23;
> cvt.s32.s16     %value, %r24;
>
> with this patch, we now generate just one:
>
> mov.u32 %value, %ar0;
>
>
> This patch should look familiar, it's almost identical to the recent patch
> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578331.html but with
> the fix https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578519.html
> [Apologies again for this breakage on affected (non-x86_64) targets; I hope
> having that fixed within a few hours (before many folks even noticed a
> problem) minimized the inconvenience].
>
> This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap"
> and "make -k check" with no new failures, and on a cross-compiler to
> nvptx-none, with no new failures in its testsuite.  OK for mainline?
>
>
> 2021-09-11  Roger Sayle  <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
> 	* expr.c (convert_move): Preserve SUBREG_PROMOTED_VAR_P when
> 	creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P
> 	subreg.
OK

Jeff

      reply	other threads:[~2021-09-11 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  9:28 Roger Sayle
2021-09-11 15:17 ` Jeff Law [this message]

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=190b78e0-32a5-d19a-ad31-00b0c1717d89@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=roger@nextmovesoftware.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).