public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: segher@kernel.crashing.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 3/6] microblaze: Fixes for RTL checking
Date: Tue, 21 Feb 2017 20:11:00 -0000	[thread overview]
Message-ID: <58AC9E42.7020104@eagerm.com> (raw)
In-Reply-To: <0b3332af5c3662c0efdf2d930c06457b0fd3cd13.1487685472.git.segher@kernel.crashing.org>

On 02/21/2017 06:48 AM, Segher Boessenkool wrote:
> REGNO can only be called on REGs, not SUBREGs; and INTVAL does not work
> on REGs.
>
> 2017-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
>
> 	* config/microblaze/microblaze.c (microblaze_expand_shift): Do not
> 	test for register moves to themselves.
> 	* config/microblaze/microblaze.md (*ashlsi3_byone, *ashrsi3_byone,
> 	*lshrsi3_byone): Test for const1_rtx instead of calling INTVAL on
> 	something that isn't necessarily a CONST_INT.
>
> ---
>   gcc/config/microblaze/microblaze.c  | 5 ++---
>   gcc/config/microblaze/microblaze.md | 6 +++---
>   2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
> index 746bef1..4850e85 100644
> --- a/gcc/config/microblaze/microblaze.c
> +++ b/gcc/config/microblaze/microblaze.c
> @@ -3322,11 +3322,10 @@ microblaze_expand_shift (rtx operands[])
>   	      || (GET_CODE (operands[1]) == REG)
>   	      || (GET_CODE (operands[1]) == SUBREG));
>
> -  /* Shift by zero -- copy regs if necessary.  */
> +  /* Shift by zero -- copy regs.  */
>     if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 0))
>       {
> -      if (REGNO (operands[0]) != REGNO (operands[1]))
> -	emit_insn (gen_movsi (operands[0], operands[1]));
> +      emit_insn (gen_movsi (operands[0], operands[1]));
>         return 1;
>       }


Why generate an unnecessary NOP?


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

  parent reply	other threads:[~2017-02-21 20:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 14:48 [PATCH 0/6] Fallout from " Segher Boessenkool
2017-02-21 14:48 ` [PATCH 2/6] cris: Fix for " Segher Boessenkool
2017-02-21 15:03   ` Hans-Peter Nilsson
2017-02-21 14:49 ` [PATCH 4/6] nios2: Fixes " Segher Boessenkool
2017-02-21 19:33   ` Jeff Law
2017-02-21 19:53   ` Sandra Loosemore
2017-02-24 22:45     ` Sandra Loosemore
2017-02-21 14:49 ` [PATCH 1/6] c6x: Fix " Segher Boessenkool
2017-02-21 15:09   ` Bernd Schmidt
2017-02-21 14:49 ` [PATCH 3/6] microblaze: Fixes " Segher Boessenkool
2017-02-21 19:28   ` Jeff Law
2017-02-21 20:11   ` Michael Eager [this message]
2017-02-21 20:33     ` Segher Boessenkool
2017-02-21 21:07       ` Michael Eager
2017-02-24 23:12         ` Segher Boessenkool
2017-02-21 20:19   ` Jakub Jelinek
2017-02-21 20:37     ` Michael Eager
2017-02-21 20:41       ` Jakub Jelinek
2017-02-21 21:23       ` Segher Boessenkool
2017-02-21 14:49 ` [PATCH 6/6] sh: " Segher Boessenkool
2017-02-21 15:49   ` Oleg Endo
2017-02-21 16:32     ` Segher Boessenkool
2017-02-21 15:01 ` [PATCH 5/6] pa: " Segher Boessenkool
2017-02-21 19:12   ` Jeff Law
2017-02-21 15:16 ` [PATCH] arc: " Segher Boessenkool
2017-02-21 19:27   ` Jeff Law
2017-02-24 19:20   ` Claudiu Zissulescu

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=58AC9E42.7020104@eagerm.com \
    --to=eager@eagerm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    /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).