1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=scalable" } */
6 #define VEC_PERM(TYPE) \
7 void __attribute__ ((noinline, noclone)) \
8 vec_slp_##TYPE (TYPE *restrict a, TYPE *restrict b, int n) \
10 for (int i = 0; i < n; ++i) \
34 /* The loop should be fully-masked. */
35 /* { dg-final { scan-assembler-times {\tld1b\t} 10 } } */
36 /* { dg-final { scan-assembler-times {\tst1b\t} 10 } } */
37 /* { dg-final { scan-assembler-times {\tld1h\t} 10 } } */
38 /* { dg-final { scan-assembler-times {\tst1h\t} 10 } } */
39 /* { dg-final { scan-assembler-times {\tld1w\t} 15 } } */
40 /* { dg-final { scan-assembler-times {\tst1w\t} 15 } } */
41 /* { dg-final { scan-assembler-times {\tld1d\t} 15 } } */
42 /* { dg-final { scan-assembler-times {\tst1d\t} 15 } } */
43 /* { dg-final { scan-assembler-not {\tldr} } } */
44 /* { dg-final { scan-assembler-not {\tstr} } } */
46 /* We should use WHILEs for all accesses. */
47 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.b} 20 } } */
48 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.h} 20 } } */
49 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.s} 30 } } */
50 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.d} 30 } } */
52 /* 6 for the 8-bit types and 2 for the 16-bit types. */
53 /* { dg-final { scan-assembler-times {\tuqdecb\t} 8 } } */
54 /* 4 for the 16-bit types and 3 for the 32-bit types. */
55 /* { dg-final { scan-assembler-times {\tuqdech\t} 7 } } */
56 /* 6 for the 32-bit types and 3 for the 64-bit types. */
57 /* { dg-final { scan-assembler-times {\tuqdecw\t} 9 } } */
58 /* { dg-final { scan-assembler-times {\tuqdecd\t} 6 } } */