From f2868e4bcff2c7b882d01231f039459c00e59d7b Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Wed, 23 Sep 2020 10:32:42 +0100 Subject: [PATCH] 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. --- gcc/config/aarch64/arm_neon.h | 7 +++++++ .../gcc.target/aarch64/simd/vldrq_p128_1.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/simd/vldrq_p128_1.c diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index fe1ab0ddd17..32b0877e282 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -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 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 + +poly128_t +test (poly128_t * p) +{ + return vldrq_p128 (p); +} + +/* { dg-final { scan-assembler-times {ldp.*x0,.*x1,.*[x0]} 1 } } */ + -- 2.30.2