From a9e48eaadab4e73c7d87ea13439dda4ba76abb2b Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Thu, 17 Jan 2019 15:17:57 +0000 Subject: [PATCH] Fix Arm testcase by using NEON. gcc/testsuite/ChangeLog: PR target/88850 * gcc.target/arm/pr51968.c: Use neon intrinsics. From-SVN: r268033 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/pr51968.c | 20 ++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12b1cbea684..103a0f73bc7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-01-17 Tamar Christina + + PR target/88850 + * gcc.target/arm/pr51968.c: Use neon intrinsics. + 2019-01-17 Andrew Stubbs Kwok Cheung Yeung Julian Brown diff --git a/gcc/testsuite/gcc.target/arm/pr51968.c b/gcc/testsuite/gcc.target/arm/pr51968.c index 99bdb961757..781470223db 100644 --- a/gcc/testsuite/gcc.target/arm/pr51968.c +++ b/gcc/testsuite/gcc.target/arm/pr51968.c @@ -1,14 +1,10 @@ /* PR target/51968 */ /* { dg-do compile } */ -/* { dg-options "-O2 -Wno-implicit-function-declaration -march=armv7-a -mfloat-abi=softfp -mfpu=neon" } */ +/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon" } */ /* { dg-require-effective-target arm_neon_ok } */ +#include -typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8))); -typedef __builtin_neon_uqi uint8x8_t __attribute__ ((__vector_size__ (8))); -typedef __builtin_neon_qi int8x16_t __attribute__ ((__vector_size__ (16))); -typedef __builtin_neon_hi int16x8_t __attribute__ ((__vector_size__ (16))); -typedef __builtin_neon_si int32x4_t __attribute__ ((__vector_size__ (16))); -struct T { int8x8_t val[2]; }; +struct T { int8x8x2_t val; }; int y; void @@ -17,16 +13,16 @@ foo (int8x8_t z, int8x8_t x, int16x8_t b, int8x8_t n) if (y) { struct T m; - __builtin_neon_vuzpv8qi (&m.val[0], z, x); + m.val = vuzp_s8 (z, x); } for (;;) { int8x16_t g; int8x8_t h, j, k; struct T m; - j = __builtin_neon_vqmovunv8hi (b); - g = __builtin_neon_vcombinev8qi (j, h); - k = __builtin_neon_vget_lowv16qi (g); - __builtin_neon_vuzpv8qi (&m.val[0], k, n); + j = vqmovn_s16 (b); + g = vcombine_s8 (j, h); + k = vget_low_s8 (g); + m.val = vuzp_s8 (k, n); } } -- 2.30.2