public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-8-branch)] AArch64: Implement vstrq_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:487056fa5333ab478eae1ba8c4e17b02839a7851

commit 487056fa5333ab478eae1ba8c4e17b02839a7851
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Wed Sep 23 10:29:17 2020 +0100

    AArch64: Implement vstrq_p128 intrinsic
    
    This patch implements the missing vstrq_p128 intrinsic.
    It just performs a store of the poly128_t argument to a memory location.
    
    Bootstrapped and tested on aarch64-none-linux-gnu.
    
    gcc/
            PR target/71233
            * config/aarch64/arm_neon.h (vstrq_p128): Define.
    
    gcc/testsuite/
            PR target/71233
            * gcc.target/aarch64/simd/vstrq_p128_1.c: New test.
    
    (cherry picked from commit d23ea1e865301cd45f14ccbdb0bca49251fde9e1)

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

diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
index a30682cab0d..bbae8c31f5e 100644
--- a/gcc/config/aarch64/arm_neon.h
+++ b/gcc/config/aarch64/arm_neon.h
@@ -30279,6 +30279,13 @@ vst4q_p64 (poly64_t * __a, poly64x2x4_t val)
   __builtin_aarch64_st4v2di ((__builtin_aarch64_simd_di *) __a, __o);
 }
 
+__extension__ extern __inline void
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+vstrq_p128 (poly128_t * __ptr, poly128_t __val)
+{
+  *__ptr = __val;
+}
+
 /* vsub */
 
 __extension__ extern __inline int64_t
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vstrq_p128_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vstrq_p128_1.c
new file mode 100644
index 00000000000..8d036fde0f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/simd/vstrq_p128_1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+void
+test (poly128_t *ptr, poly128_t a)
+{
+  vstrq_p128 (ptr, a);
+}
+
+/* { dg-final { scan-assembler-times {stp.*x2,.*x3,.*[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 vstrq_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).