From afa4401edd8a6a882848a6613d5441b0d0a10587 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Mon, 17 May 2021 11:59:01 +0000 Subject: [PATCH] testsuite/arm: Factorize and increase coverage in mve-sub_1.c Use a template macro to factorize the existing test functions. This patch also adds a version to check subtraction with __fp16 type. 2021-05-17 Christophe Lyon gcc/testsuite/ * gcc.target/arm/simd/mve-vsub_1.c: Factorize and add __fp16 test. --- .../gcc.target/arm/simd/mve-vsub_1.c | 60 +++++++------------ 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/simd/mve-vsub_1.c b/gcc/testsuite/gcc.target/arm/simd/mve-vsub_1.c index 842e5c6a30bd..5a6c34584cfc 100644 --- a/gcc/testsuite/gcc.target/arm/simd/mve-vsub_1.c +++ b/gcc/testsuite/gcc.target/arm/simd/mve-vsub_1.c @@ -5,60 +5,42 @@ #include -void test_vsub_i32 (int32_t * dest, int32_t * a, int32_t * b) { - int i; - for (i=0; i<4; i++) { - dest[i] = a[i] - b[i]; - } +#define FUNC(SIGN, TYPE, BITS, NB, OP, NAME) \ + void test_ ## NAME ##_ ## SIGN ## BITS ## x ## NB (TYPE##BITS##_t * __restrict__ dest, \ + TYPE##BITS##_t *a, TYPE##BITS##_t *b) { \ + int i; \ + for (i=0; i