diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c b/gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c index 8f54a2a3143..3871451bc1d 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c +++ b/gcc/testsuite/gcc.target/aarch64/sve_nlogical_1.c @@ -1,25 +1,30 @@ /* { dg-do assemble } */ -/* { dg-options "-std=c99 -O3 -march=armv8-a+sve --save-temps" } */ +/* { dg-options "-O3 -march=armv8-a+sve --save-temps" } */ -#define DO_VNLOGICAL(TYPE) \ -void __attribute__ ((weak)) \ -vnlogical_not_##TYPE (TYPE *dst, unsigned long count) \ -{ \ - for (int i = 0; i < count; i++) \ - dst[i] = ~dst[i]; \ -} \ - \ -void __attribute__ ((weak)) \ -vnlogical_bic_##TYPE (TYPE *dst, TYPE *src, unsigned long count) \ -{ \ - for (int i = 0; i < count; i++) \ - dst[i] = dst[i] & ~src[i]; \ +#include <stdint.h> + +#define DO_VNLOGICAL(TYPE) \ +void __attribute__ ((noinline, noclone)) \ +vnlogical_not_##TYPE (TYPE *dst, int count) \ +{ \ + for (int i = 0; i < count; i++) \ + dst[i] = ~dst[i]; \ +} \ + \ +void __attribute__ ((noinline, noclone)) \ +vnlogical_bic_##TYPE (TYPE *dst, TYPE *src, int count) \ +{ \ + for (int i = 0; i < count; i++) \ + dst[i] = dst[i] & ~src[i]; \ } -DO_VNLOGICAL (char) -DO_VNLOGICAL (short) -DO_VNLOGICAL (int) -DO_VNLOGICAL (long) +#define TEST_ALL(T) \ + T (int8_t) \ + T (int16_t) \ + T (int32_t) \ + T (int64_t) + +TEST_ALL (DO_VNLOGICAL) /* { dg-final { scan-assembler-times {\tnot\tz[0-9]+\.b, p[0-7]/m, z[0-9]+\.b\n} 1 } } */ /* { dg-final { scan-assembler-times {\tnot\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h\n} 1 } } */ |