This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AARCH64] Adding constant folding for __builtin_fmulx* with scalar 32 and 64 bit arguments
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Bilyan Borisov <bilyan dot borisov at foss dot arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2015 14:25:14 +0000
- Subject: Re: [AARCH64] Adding constant folding for __builtin_fmulx* with scalar 32 and 64 bit arguments
- Authentication-results: sourceware.org; auth=none
- References: <5640861B dot 9090801 at foss dot arm dot com>
On Mon, Nov 09, 2015 at 11:40:11AM +0000, Bilyan Borisov wrote:
> This patch adds an extension to aarch64_gimple_fold_builtin () that does
> constant folding on __builtin_fmulx* calls for 32 and 64 bit floating point
> scalar modes. We fold when both arguments are constant, as well as when only one
> is. The special cases of 0*inf, -0*inf, 0*-inf, and -0*-inf are also
> handled. The case for vector constant arguments will be dealt with in a future
> patch since the tests for that would be obscure and would unnecessarily
> complicate this patch.
>
> Added tests to check for proper handling of constant folding. Tested on targets
> aarch64-none-elf and aarch64_be-none-elf.
>
> ---
>
> gcc/
>
> 2015-XX-XX Bilyan Borisov <bilyan.borisov@arm.com>
>
> * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin): Added
> constant folding.
>
> gcc/testsuite/
>
> 2015-XX-XX Bilyan Borisov <bilyan.borisov@arm.com>
>
> * gcc.target/aarch64/simd/vmulx.x: New.
> * gcc.target/aarch64/simd/vmulx_f64_2.c: Likewise.
> * gcc.target/aarch64/simd/vmulxd_f64_2.c: Likewise.
> * gcc.target/aarch64/simd/vmulxs_f32_2.c: Likewise.
>
OK, thanks.
I've committed this on your behalf as revision 230758 with a slight tweak to
the changelog to read:
* config/aarch64/aarch64-builtins.c
(aarch64_gimple_fold_builtin): Fold FMULX.
Thanks,
James