1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
8 #define INDEX16 int16_t
9 #define INDEX32 int32_t
10 #define INDEX64 int64_t
13 #define TEST_LOOP(DATA_TYPE, BITS) \
14 void __attribute__ ((noinline, noclone)) \
15 f_##DATA_TYPE##_##BITS (DATA_TYPE *restrict dest, \
16 DATA_TYPE *restrict src, \
17 INDEX##BITS stride, INDEX##BITS n) \
19 for (INDEX##BITS i = 0; i < n; ++i) \
20 dest[i] += src[i * stride]; \
23 #define TEST_TYPE(T, DATA_TYPE) \
30 TEST_TYPE (T, int32_t) \
31 TEST_TYPE (T, uint32_t) \
32 TEST_TYPE (T, float) \
33 TEST_TYPE (T, int64_t) \
34 TEST_TYPE (T, uint64_t) \
39 /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+.s, sxtw 2\]\n} 9 } } */
40 /* { dg-final { scan-assembler-times {\tld1d\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+.d, lsl 3\]\n} 12 } } */