[AARCH64] Adding constant folding for __builtin_fmulx* with scalar 32 and 64 bit arguments
James Greenhalgh
james.greenhalgh@arm.com
Mon Nov 23 14:35:00 GMT 2015
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
More information about the Gcc-patches
mailing list