public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-8-branch)] AArch64: Implement vldrq_p128 intrinsic
@ 2021-04-23 10:13 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-04-23 10:13 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9c3699267be15cc605431bbebcb8c7856f81cc19

commit 9c3699267be15cc605431bbebcb8c7856f81cc19
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Wed Sep 23 10:32:42 2020 +0100

    AArch64: Implement vldrq_p128 intrinsic
    
    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.
    
    (cherry picked from commit f2868e4bcff2c7b882d01231f039459c00e59d7b)

Diff:
---
 gcc/config/aarch64/arm_neon.h                        |  7 +++++++
 gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c | 13 +++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
index bbae8c31f5e..d7dc4568d41 100644
--- a/gcc/config/aarch64/arm_neon.h
+++ b/gcc/config/aarch64/arm_neon.h
@@ -19807,6 +19807,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
index 00000000000..9c7e01b9e10
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c
@@ -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 } } */
+


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-23 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 10:13 [gcc(refs/vendors/redhat/heads/gcc-8-branch)] AArch64: Implement vldrq_p128 intrinsic Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).