From d83b0c6975523ce57f29ec5a081b5b2068bf02bf Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Mon, 10 May 2021 12:45:30 +0000 Subject: [PATCH] testsuite/arm: Add mve-vsub-scalar-1.c test This patchs adds a test similar to mve-vsub_1.c, but operates on a scalar as second argument. For the moment we do not select the T2 vsub variant operating on a scalar final argument, and we use vadd of the opposite. 2021-05-10 Christophe Lyon gcc/testsuite/ * gcc.target/arm/simd/mve-vsub-scalar-1.c: New test. --- .../gcc.target/arm/simd/mve-vsub-scalar-1.c | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/simd/mve-vsub-scalar-1.c diff --git a/gcc/testsuite/gcc.target/arm/simd/mve-vsub-scalar-1.c b/gcc/testsuite/gcc.target/arm/simd/mve-vsub-scalar-1.c new file mode 100644 index 000000000000..61a9a0e046a4 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/simd/mve-vsub-scalar-1.c @@ -0,0 +1,47 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ +/* { dg-additional-options "-O3" } */ + +#include + +#define FUNC_IMM(SIGN, TYPE, BITS, NB, OP, NAME) \ + void test_ ## NAME ##_ ## SIGN ## BITS ## x ## NB (TYPE##BITS##_t * __restrict__ dest, \ + TYPE##BITS##_t *a) { \ + int i; \ + for (i=0; i