public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Tom de Vries <Tom_deVries@mentor.com>
Cc: Steve Ellcey <sellcey@mips.com>,
	Andrew Pinski <pinskia@gmail.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix PR55876 - Make generation of paradoxical subreg in widen_operand more robust
Date: Mon, 07 Jan 2013 17:48:00 -0000	[thread overview]
Message-ID: <50EB0A5D.1000302@redhat.com> (raw)
In-Reply-To: <50EAA074.3050402@mentor.com>

On 01/07/2013 02:16 AM, Tom de Vries wrote:
> -  /* If MODE is no wider than a single word, we return a paradoxical
> -     SUBREG.  */
> +  /* If MODE is no wider than a single word, we return a
> +     lowpart or paradoxical SUBREG.  */
>    if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
> -    return gen_rtx_SUBREG (mode, force_reg (GET_MODE (op), op), 0);
> +    {
> +      if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (op)))
> +       return gen_lowpart_SUBREG (mode, op);
> +      else
> +       return gen_rtx_SUBREG (mode, force_reg (GET_MODE (op), op), 0);
> +    }

Is there any good reason we're using gen_rtx_SUBREG directly here?
Seems like this sort of logic would be present in plain gen_lowpart,
generating the paradoxical subreg that we want.


r~

  reply	other threads:[~2013-01-07 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50EA9FDD.6000803@mentor.com>
2013-01-07 10:16 ` Tom de Vries
2013-01-07 17:48   ` Richard Henderson [this message]
2013-01-14 14:44     ` Tom de Vries
2013-01-15 17:12       ` Richard Henderson

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=50EB0A5D.1000302@redhat.com \
    --to=rth@redhat.com \
    --cc=Tom_deVries@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    --cc=sellcey@mips.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).