[AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 3 Sep 2019 08:38:08 +0000 (08:38 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 3 Sep 2019 08:38:08 +0000 (08:38 +0000)
commit10bd1d964ef12daa9f92ff0b8d1e5f600aa63f7b
tree2628761019cbc1aa1ce2a36ba88c55739a9b643a
parente0664b7a63ed8305e9f8539309df7fb3eb13babe
[AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]

This patch implements the ACLE intrinsics to access the FRINT[32,64][Z,X] scalar[1] and vector[2][3] instructions
from Armv8.5-a. These are enabled when the __ARM_FEATURE_FRINT macro is defined.

They're added in a fairly standard way through builtins and unspecs at the RTL level.

* config/aarch64/aarch64.md ("unspec"): Add UNSPEC_FRINT32Z,
UNSPEC_FRINT32X, UNSPEC_FRINT64Z, UNSPEC_FRINT64X.
(aarch64_<frintnzs_op><mode>): New define_insn.
* config/aarch64/aarch64.h (TARGET_FRINT): Define.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_FRINT when appropriate.
* config/aarch64/aarch64-simd-builtins.def: Add builtins for frint32z,
frint32x, frint64z, frint64x.
* config/aarch64/arm_acle.h (__rint32zf, __rint32z, __rint64zf,
__rint64z, __rint32xf, __rint32x, __rint64xf, __rint64x): Define.
* config/aarch64/arm_neon.h (vrnd32z_f32, vrnd32zq_f32, vrnd32z_f64,
vrnd32zq_f64, vrnd32x_f32, vrnd32xq_f32, vrnd32x_f64, vrnd32xq_f64,
vrnd64z_f32, vrnd64zq_f32, vrnd64z_f64, vrnd64zq_f64, vrnd64x_f32,
vrnd64xq_f32, vrnd64x_f64, vrnd64xq_f64): Define.
* config/aarch64/iterators.md (VSFDF): Define.
(FRINTNZX): Likewise.
(frintnzs_op): Likewise.

* gcc.target/aarch64/acle/rintnzx_1.c: New test.
* gcc.target/aarch64/simd/vrndnzx_1.c: Likewise.

From-SVN: r275334
gcc/ChangeLog
gcc/config/aarch64/aarch64-c.c
gcc/config/aarch64/aarch64-simd-builtins.def
gcc/config/aarch64/aarch64.h
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/arm_acle.h
gcc/config/aarch64/arm_neon.h
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/acle/rintnzx_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/simd/vrndnzx_1.c [new file with mode: 0644]