diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2020-09-23 12:02:29 +0100 |
---|---|---|
committer | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2020-09-28 17:13:21 +0100 |
commit | 852423cd68b403d09a14f6436080243c609a57a8 (patch) | |
tree | 042cd32ed2f827501c1f50c962270bd79282b8a0 /gcc/testsuite | |
parent | 99a8808add97c61b64a4cb979e4616731b86e58b (diff) | |
download | gcc-852423cd68b403d09a14f6436080243c609a57a8.zip gcc-852423cd68b403d09a14f6436080243c609a57a8.tar.gz gcc-852423cd68b403d09a14f6436080243c609a57a8.tar.bz2 |
AArch64: Implement missing vrndns_f32 intrinsic
This patch implements the missing vrndns_f32 intrinsic. This operates on a scalar float32_t value.
It can be mapped down to a __builtin_aarch64_frintnsf builtin.
This patch does that.
Bootstrapped and tested on aarch64-none-linux-gnu.
gcc/
PR target/71233
* config/aarch64/aarch64-simd-builtins.def (frintn): Use BUILTIN_VHSDF_HSDF
for modes. Remove explicit hf instantiation.
* config/aarch64/arm_neon.h (vrndns_f32): Define.
gcc/testsuite/
PR target/71233
* gcc.target/aarch64/simd/vrndns_f32_1.c: New test.
(cherry picked from commit 02b5377b3766804059b7824330d33d0e1cef2e5b)
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c new file mode 100644 index 0000000..960e4f6 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +#include <arm_neon.h> + +float32_t +test (float32_t a) +{ + return vrndns_f32 (a); +} + +/* { dg-final { scan-assembler-times "frintn\\ts\[0-9\]+, s\[0-9\]+" 1 } } */ + |