This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Remove '*' from movsi/di/ti patterns
- From: Andrew Pinski <pinskia at gmail dot com>
- To: James Greenhalgh <james dot greenhalgh at arm dot com>
- Cc: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Tue, 12 Sep 2017 19:10:43 -0700
- Subject: Re: [PATCH][AArch64] Remove '*' from movsi/di/ti patterns
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB20531CE5EB7BEE60F8B2D3B483B90@DB6PR0801MB2053.eurprd08.prod.outlook.com> <20170912161025.GA33912@arm.com>
On Tue, Sep 12, 2017 at 9:10 AM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Wed, Jul 26, 2017 at 02:46:14PM +0100, Wilco Dijkstra 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?
>
> OK.
>
> These attempts at register allocator costs are just trouble!
Note this caused a few testsuite failures:
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.2d,
v[0-9]+.d\\[[0-9]+\\] 1
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.2d, x[0-9]+ 2
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.2s,
v[0-9]+.s\\[[0-9]+\\] 1
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.2s, w[0-9]+ 2
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.4s,
v[0-9]+.s\\[[0-9]+\\] 1
gcc.target/aarch64/vmov_n_1.c scan-assembler-times dup\\tv[0-9]+.4s, w[0-9]+ 2
I suspect we are using the d/s registers in these cases rather than
x/w register (I did not look into the code generation to check that
but if we are then this is better code anyways).
Thanks,
Andrew
>
> Thanks,
> James
>
>>
>> ChangeLog:
>> 2017-07-26 Wilco Dijkstra <wdijkstr@arm.com>
>>
>> * gcc/config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
>> (movdi_aarch64): Likewise.
>> (movti_aarch64): Likewise.
>> --
>>