From: Andrew Pinski <pinskia@gmail.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
James Greenhalgh <James.Greenhalgh@arm.com>, nd <nd@arm.com>
Subject: Re: [PATCH][AArch64] Remove '*' from movsi/di/ti patterns
Date: Sat, 09 Sep 2017 06:58:00 -0000 [thread overview]
Message-ID: <CA+=Sn1n6gJqq_DsZwvZ6WcY1=GAbbK1W+nmdtC0Yt+XZ7Z5wjw@mail.gmail.com> (raw)
In-Reply-To: <DB6PR0801MB20531CE5EB7BEE60F8B2D3B483B90@DB6PR0801MB2053.eurprd08.prod.outlook.com>
On Wed, Jul 26, 2017 at 6:46 AM, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
> Remove the remaining uses of '*' from the movsi/di/ti patterns.
> Using '*' in alternatives is typically incorrect at it tells the register
> allocator to ignore those alternatives. So remove these from all the
> integer move patterns. This removes unnecessary int to float moves, for
> example gcc.target/aarch64/pr62178.c no longer generates a redundant fmov
> since the w = m variant is now allowed.
>
> Passes regress & bootstrap, OK for commit?
I had looked into doing the similar thing but I did not have any way
of benchmarking the patch, I decided to drop the patch.
That is the patch looks good to me (though I cannot approve it).
Thanks,
Andrew
>
> ChangeLog:
> 2017-07-26 Wilco Dijkstra <wdijkstr@arm.com>
>
> * gcc/config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
> (movdi_aarch64): Likewise.
> (movti_aarch64): Likewise.
> --
>
> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index 225b64e1daf1663d28bbe8c2d30ba373b4722176..97c5fb08a2fd5d2eee556e1fc20dbf65b089d84b 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -920,8 +920,8 @@ (define_expand "mov<mode>"
> )
>
> (define_insn_and_split "*movsi_aarch64"
> - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m, m,r,r ,*w,r,*w")
> - (match_operand:SI 1 "aarch64_mov_operand" " r,r,k,M,n,m, m,rZ,*w,Usa,Ush,rZ,w,*w"))]
> + [(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r,w,m, m, r, r, w,r,w")
> + (match_operand:SI 1 "aarch64_mov_operand" " r,r,k,M,n,m,m,rZ,w,Usa,Ush,rZ,w,w"))]
> "(register_operand (operands[0], SImode)
> || aarch64_reg_or_zero (operands[1], SImode))"
> "@
> @@ -952,8 +952,8 @@ (define_insn_and_split "*movsi_aarch64"
> )
>
> (define_insn_and_split "*movdi_aarch64"
> - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m, m,r,r, *w,r,*w,w")
> - (match_operand:DI 1 "aarch64_mov_operand" " r,r,k,N,n,m, m,rZ,*w,Usa,Ush,rZ,w,*w,Dd"))]
> + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,k,r,r,r,r,w, m,m, r, r, w,r,w,w")
> + (match_operand:DI 1 "aarch64_mov_operand" " r,r,k,N,n,m,m,rZ,w,Usa,Ush,rZ,w,w,Dd"))]
> "(register_operand (operands[0], DImode)
> || aarch64_reg_or_zero (operands[1], DImode))"
> "@
> @@ -1008,9 +1008,9 @@ (define_expand "movti"
>
> (define_insn "*movti_aarch64"
> [(set (match_operand:TI 0
> - "nonimmediate_operand" "=r, *w,r ,*w,r,m,m,*w,m")
> + "nonimmediate_operand" "=r, w,r,w,r,m,m,w,m")
> (match_operand:TI 1
> - "aarch64_movti_operand" " rn,r ,*w,*w,m,r,Z, m,*w"))]
> + "aarch64_movti_operand" " rn,r,w,w,m,r,Z,m,w"))]
> "(register_operand (operands[0], TImode)
> || aarch64_reg_or_zero (operands[1], TImode))"
> "@
next prev parent reply other threads:[~2017-09-09 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 13:46 Wilco Dijkstra
2017-08-01 10:18 ` Wilco Dijkstra
2017-08-15 16:27 ` Wilco Dijkstra
2017-09-09 6:58 ` Andrew Pinski [this message]
2017-09-12 16:11 ` James Greenhalgh
2017-09-13 2:10 ` Andrew Pinski
2017-09-13 11:46 ` Wilco Dijkstra
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='CA+=Sn1n6gJqq_DsZwvZ6WcY1=GAbbK1W+nmdtC0Yt+XZ7Z5wjw@mail.gmail.com' \
--to=pinskia@gmail.com \
--cc=James.Greenhalgh@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.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).