1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize -fwrapv --save-temps" } */
7 #define INDEX16 int16_t
8 #define INDEX32 int32_t
11 /* Invoked 18 times for each data size. */
12 #define TEST_LOOP(DATA_TYPE, BITS) \
13 void __attribute__ ((noinline, noclone)) \
14 f_##DATA_TYPE (DATA_TYPE *restrict dest, DATA_TYPE *restrict src, \
15 INDEX##BITS *indices, INDEX##BITS mask, int n) \
17 for (int i = 9; i < n; ++i) \
18 dest[(INDEX##BITS) (indices[i] | mask)] = src[i] + 1; \
31 /* { dg-final { scan-assembler-times {\tsunpkhi\tz[0-9]+\.s, z[0-9]+\.h\n} 3 } } */
32 /* { dg-final { scan-assembler-times {\tsunpklo\tz[0-9]+\.s, z[0-9]+\.h\n} 3 } } */
33 /* { dg-final { scan-assembler-times {\tsunpkhi\tz[0-9]+\.d, z[0-9]+\.s\n} 3 } } */
34 /* { dg-final { scan-assembler-times {\tsunpklo\tz[0-9]+\.d, z[0-9]+\.s\n} 3 } } */
35 /* { dg-final { scan-assembler-times {\tst1w\tz[0-9]+\.s, p[0-7], \[x[0-9]+, z[0-9]+.s, sxtw 2\]\n} 6 } } */
36 /* { dg-final { scan-assembler-times {\tst1d\tz[0-9]+\.d, p[0-7], \[x[0-9]+, z[0-9]+.d, lsl 3\]\n} 6 } } */