This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][AArch64] Fix subreg bug in scalar copysign
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: nd <nd at arm dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Tue, 2 May 2017 09:08:35 +0000
- Subject: Re: [PATCH][GCC][AArch64] Fix subreg bug in scalar copysign
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- References: <VI1PR0801MB2031C64CEFD6A5AB99C97737FF270@VI1PR0801MB2031.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Ping
________________________________________
From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org> on behalf of Tamar Christina <Tamar.Christina@arm.com>
Sent: Wednesday, March 15, 2017 4:04:35 PM
To: GCC Patches
Cc: nd; James Greenhalgh; Richard Earnshaw; Marcus Shawcroft
Subject: [PATCH][GCC][AArch64] Fix subreg bug in scalar copysign
Hi All,
This fixes a bug in the scalar version of copysign where due to a subreg
were generating less than efficient code.
This patch replaces
return x * __builtin_copysignf (150.0f, y);
which used to generate
adrp x1, .LC1
mov x0, 2147483648
ins v3.d[0], x0
ldr s2, [x1, #:lo12:.LC1]
bsl v3.8b, v1.8b, v2.8b
fmul s0, s0, s3
ret
.LC1:
.word 1125515264
with
mov x0, 1125515264
movi v2.2s, 0x80, lsl 24
fmov d3, x0
bit v3.8b, v1.8b, v2.8b
fmul s0, s0, s3
ret
removing the incorrect ins.
Regression tested on aarch64-none-linux-gnu and no regressions.
OK for trunk?
Thanks,
Tamar
gcc/
2017-03-15 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.md
(copysignsf3): Fix mask generation.