This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][AArch64] Fix incorrect INS in SIMD mov pattern
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Tamar Christina <Tamar dot Christina at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 15 Mar 2017 18:50:52 +0000
- Subject: Re: [PATCH][GCC][AArch64] Fix incorrect INS in SIMD mov pattern
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <VI1PR0801MB2031CF1F90EDC267CBA90A06FF270@VI1PR0801MB2031.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Wed, Mar 15, 2017 at 04:09:05PM +0000, Tamar Christina wrote:
> This patch fixes a bug in the SIMD mov pattern where we were doing an
> insert and leaving the rest of the vector in an undetermined state. This
> could cause a bug if something else expects the other lanes to be 0.
>
> Semantically we wanted a mov here and not an insert. This is in line
> with other patterns that use an fmov for the same reason,
> e.g. aarch64_combinez*.
>
> Regression tested on aarch64-none-linux-gnu and no regressions.<br>
>
> OK for trunk?
This isn't technically a regression, but the bug would be subtle enough,
and hard enough to debug that I think we should fix it for GCC 7.
OK for trunk, where else does this need backported to?
Thanks,
James
> gcc/
> 2017-03-15 Tamar Christina; <tamar.christina@arm.com>
>
> * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
> Change ins into fmov.