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.
This commit is contained in:
parent
52e5b3fd8e
commit
02b5377b37
@ -338,12 +338,11 @@
|
||||
BUILTIN_VHSDF (UNOP, nearbyint, 2, FP)
|
||||
BUILTIN_VHSDF (UNOP, rint, 2, FP)
|
||||
BUILTIN_VHSDF (UNOP, round, 2, FP)
|
||||
BUILTIN_VHSDF_DF (UNOP, frintn, 2, FP)
|
||||
BUILTIN_VHSDF_HSDF (UNOP, frintn, 2, FP)
|
||||
|
||||
VAR1 (UNOP, btrunc, 2, FP, hf)
|
||||
VAR1 (UNOP, ceil, 2, FP, hf)
|
||||
VAR1 (UNOP, floor, 2, FP, hf)
|
||||
VAR1 (UNOP, frintn, 2, FP, hf)
|
||||
VAR1 (UNOP, nearbyint, 2, FP, hf)
|
||||
VAR1 (UNOP, rint, 2, FP, hf)
|
||||
VAR1 (UNOP, round, 2, FP, hf)
|
||||
|
@ -26073,6 +26073,13 @@ vrndmq_f64 (float64x2_t __a)
|
||||
|
||||
/* vrndn */
|
||||
|
||||
__extension__ extern __inline float32_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vrndns_f32 (float32_t __a)
|
||||
{
|
||||
return __builtin_aarch64_frintnsf (__a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline float32x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vrndn_f32 (float32x2_t __a)
|
||||
|
13
gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c
Normal file
13
gcc/testsuite/gcc.target/aarch64/simd/vrndns_f32_1.c
Normal file
@ -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 } } */
|
||||
|
Loading…
Reference in New Issue
Block a user