public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>, rdsandiford@googlemail.com
Subject: Re: [RFA] [PATCH] Fix invalid redundant extension elimination for rl78 port
Date: Wed, 16 Dec 2015 19:09:00 -0000	[thread overview]
Message-ID: <5671B6E5.5000709@redhat.com> (raw)
In-Reply-To: <871tb655i9.fsf@googlemail.com>

On 12/01/2015 12:32 PM, Richard Sandiford wrote:
> Jeff Law <law@redhat.com> writes:
>> @@ -1080,6 +1070,18 @@ add_removable_extension (const_rtx expr, rtx_insn *insn,
>>   	      }
>>   	  }
>>
>> +      /* Fourth, if the extended version occupies more registers than the
>> +	 original and the source of the extension is the same hard register
>> +	 as the destination of the extension, then we can not eliminate
>> +	 the extension without deep analysis, so just punt.
>> +
>> +	 We allow this when the registers are different because the
>> +	 code in combine_reaching_defs will handle that case correctly.  */
>> +      if ((HARD_REGNO_NREGS (REGNO (dest), mode)
>> +	   != HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)))
>> +	  && REGNO (dest) == REGNO (reg))
>> +	return;
>> +
>>         /* Then add the candidate to the list and insert the reaching definitions
>>            into the definition map.  */
>>         ext_cand e = {expr, code, mode, insn};
>
> I might be wrong, but the check looks specific to little-endian.  Would
> it make sense to use reg_overlap_mentioned_p instead of the REGNO check?
Agreed.  Testing in progress now...

jeff

  reply	other threads:[~2015-12-16 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 20:16 Jeff Law
2015-11-23 23:43 ` Bernd Schmidt
2015-12-01 19:32 ` Richard Sandiford
2015-12-16 19:09   ` Jeff Law [this message]
2015-12-16 20:35   ` Jeff Law

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=5671B6E5.5000709@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rdsandiford@googlemail.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).