1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
6 #define TEST_LOOP(DATA_TYPE, NAME, SCALE) \
7 void __attribute__ ((noinline, noclone)) \
8 f_##DATA_TYPE##_##NAME (DATA_TYPE *restrict dest, \
9 DATA_TYPE *restrict src) \
11 for (long i = 0; i < 1000; ++i) \
12 dest[i] += src[i * SCALE]; \
15 #define TEST_TYPE(T, DATA_TYPE) \
18 T (DATA_TYPE, 11, 11) \
19 T (DATA_TYPE, 200, 200) \
20 T (DATA_TYPE, m100, -100)
23 TEST_TYPE (T, int32_t) \
24 TEST_TYPE (T, uint32_t) \
25 TEST_TYPE (T, float) \
26 TEST_TYPE (T, int64_t) \
27 TEST_TYPE (T, uint64_t) \
32 /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+.s, uxtw\]\n} 12 } } */
33 /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+.s, sxtw\]\n} 3 } } */
34 /* { dg-final { scan-assembler-times {\tld1d\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+.d\]\n} 15 } } */