From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1652) id 9A3C4383541F; Mon, 17 May 2021 11:59:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A3C4383541F MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Christophe Lyon To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-830] testsuite/arm: Factorize and increase coverage in mve-sub_1.c X-Act-Checkin: gcc X-Git-Author: Christophe Lyon X-Git-Refname: refs/heads/master X-Git-Oldrev: e87d568e9e3e331e22850127308abedd0642e5e8 X-Git-Newrev: afa4401edd8a6a882848a6613d5441b0d0a10587 Message-Id: <20210517115917.9A3C4383541F@sourceware.org> Date: Mon, 17 May 2021 11:59:17 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2021 11:59:17 -0000 https://gcc.gnu.org/g:afa4401edd8a6a882848a6613d5441b0d0a10587 commit r12-830-gafa4401edd8a6a882848a6613d5441b0d0a10587 Author: Christophe Lyon Date: Mon May 17 11:59:01 2021 +0000 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: --- gcc/testsuite/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 842e5c6a30b..5a6c34584cf 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