From: Christophe Lyon Date: Mon, 17 May 2021 11:59:01 +0000 (+0000) Subject: testsuite/arm: Factorize and increase coverage in mve-sub_1.c X-Git-Tag: basepoints/gcc-13~7483 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa4401edd8a6a882848a6613d5441b0d0a10587;p=thirdparty%2Fgcc.git 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. --- 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