AArch64: Implement vldrq_p128 intrinsic
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 23 Sep 2020 09:32:42 +0000 (10:32 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 23 Sep 2020 09:32:42 +0000 (10:32 +0100)
This patch implements the missing vldrq_p128 intrinsic that just loads from the appropriate pointer.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/
PR target/71233
* config/aarch64/arm_neon.h (vldrq_p128): Define.

gcc/testsuite/
PR target/71233
* gcc.target/aarch64/simd/vldrq_p128_1.c: New test.

gcc/config/aarch64/arm_neon.h
gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c [new file with mode: 0644]

index fe1ab0ddd17902df044b9037866c654a636e0e3c..32b0877e2826c4680f1ed0564b6fa360351bcd35 100644 (file)
@@ -19676,6 +19676,13 @@ vld4q_p64 (const poly64_t * __a)
   return ret;
 }
 
+__extension__ extern __inline poly128_t
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+vldrq_p128 (const poly128_t * __ptr)
+{
+  return *__ptr;
+}
+
 /* vldn_dup */
 
 __extension__ extern __inline int8x8x2_t
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c
new file mode 100644 (file)
index 0000000..9c7e01b
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+poly128_t
+test (poly128_t * p)
+{
+  return vldrq_p128 (p);
+}
+
+/* { dg-final { scan-assembler-times {ldp.*x0,.*x1,.*[x0]} 1 } } */
+