This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Ping^8 Re: [Patch AArch64 11/17] Add floatdihf2 and floatunsdihf2 patterns
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <nd at arm dot com>, <richard dot earnshaw at arm dot com>, <marcus dot shawcroft at arm dot com>, <joseph at codesourcery dot com>
- Date: Thu, 24 Nov 2016 09:46:08 +0000
- Subject: Ping^8 Re: [Patch AArch64 11/17] Add floatdihf2 and floatunsdihf2 patterns
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; codesourcery.com; dkim=none (message not signed) header.d=none;codesourcery.com; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <1478878647-22547-1-git-send-email-james.greenhalgh@arm.com> <1478878851-22639-1-git-send-email-james.greenhalgh@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Nov 11, 2016 at 03:40:49PM +0000, James Greenhalgh wrote:
>
> Hi,
>
> This patch adds patterns for conversion from 64-bit integer to 16-bit
> floating-point values under AArch64 targets which don't have support for
> the ARMv8.2-A 16-bit floating point extensions.
>
> We implement these by first saturating to a SImode (we know that any
> values >= 65504 will round to infinity after conversion to HFmode), then
> converting to a DFmode (unsigned conversions could go to SFmode, but there
> is no performance benefit to this). Then converting to HFmode.
>
> Having added these patterns, the expansion path in "expand_float" will
> now try to use them for conversions from SImode to HFmode as there is no
> floatsihf2 pattern. expand_float first tries widening the integer size and
> looking for a match, so it will try SImode -> DImode. But our DI mode
> pattern is going to then saturate us back to SImode which is wasteful.
>
> Better, would be for us to provide float(uns)sihf2 patterns directly.
> So that's what this patch does.
>
> The testcase add in this patch would fail on trunk for AArch64. There is
> no libgcc routine to make the conversion, and we don't provide appropriate
> patterns in the backend, so we get a link-time error.
>
> Bootstrapped and tested on aarch64-none-linux-gnu
Ping ^8
Thanks,
James
>
> OK for trunk?
>
> James
>