diff options
author | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-22 12:33:51 +0000 |
---|---|---|
committer | ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-22 12:33:51 +0000 |
commit | 8056dfaa6b4b1536fba58709cafdb414f5133039 (patch) | |
tree | 39786929815cfd43e40f5df34be78be18c18e84f /gcc | |
parent | b92d4fd1609390ae88e331120fad05071d9cdd84 (diff) | |
download | gcc-8056dfaa6b4b1536fba58709cafdb414f5133039.tar.gz |
[AArch64] Implement vbsl_f64 arm_neon.h intrinsic.
[gcc/]
* config/aarch64/arm_neon.h (vbsl_f64): New intrinsic.
[testsuite/]
* gcc.target/aarch64/simd/vbsl_f64_1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/aarch64/arm_neon.h | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/simd/vbsl_f64_1.c | 32 |
4 files changed, 47 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a6219e435e..2d7f1e0168d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * config/aarch64/arm_neon.h (vbsl_f64): New intrinsic. + 2014-07-22 Roman Gareev <gareevroman@gmail.com> * graphite-isl-ast-to-gimple.c: diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index 80d1ca6b576..66968e8d198 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -13657,6 +13657,13 @@ vbsl_f32 (uint32x2_t __a, float32x2_t __b, float32x2_t __c) return __builtin_aarch64_simd_bslv2sf_suss (__a, __b, __c); } +__extension__ static __inline float64x1_t __attribute__ ((__always_inline__)) +vbsl_f64 (uint64x1_t __a, float64x1_t __b, float64x1_t __c) +{ + return (float64x1_t) + { __builtin_aarch64_simd_bsldf_suss (__a[0], __b[0], __c[0]) }; +} + __extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) vbsl_p8 (uint8x8_t __a, poly8x8_t __b, poly8x8_t __c) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2563fb5d576..14af70506d0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * gcc.target/aarch64/simd/vbsl_f64_1.c: New test. + 2014-07-22 Uros Bizjak <ubizjak@gmail.com> * gcc.target/i386/fuse-caller-save-xmm.c (dg-options): Use diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vbsl_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vbsl_f64_1.c new file mode 100644 index 00000000000..537c5bde5c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vbsl_f64_1.c @@ -0,0 +1,32 @@ +/* Test the vbsl_f64 AArch64 SIMD intrinsic. */ + +/* { dg-do run } */ +/* { dg-options "-O3" } */ + +#include "arm_neon.h" + +extern void abort (void); + +int +main (void) +{ + float64x1_t expected, actual; + float64_t expected_scalar, actual_scalar; + float64x1_t arg1, arg2; + uint64_t mask = 0xf0fc00fbf000fa0fULL; + uint64_t arg1_uint = 0xdeadbeefbada9832ULL; + uint64_t arg2_uint = 0xcafe3254deed7111ULL; + + arg1 = vcreate_f64 (arg1_uint); + arg2 = vcreate_f64 (arg2_uint); + expected = vcreate_f64 ((arg1_uint & mask) | (arg2_uint & ~mask)); + actual = vbsl_f64 (vcreate_u64 (mask), arg1, arg2); + + expected_scalar = vget_lane_f64 (expected, 0); + actual_scalar = vget_lane_f64 (actual, 0); + + if (expected_scalar != actual_scalar) + abort (); + + return 0; +} |