Handle SLP permutations for variable-length vectors
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / slp_perm_1.c
blob0d4892eab81d8d6b8395144c28ac773c348e741c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 #include <stdint.h>
6 void
7 f (uint8_t *restrict a, uint8_t *restrict b)
9 for (int i = 0; i < 100; ++i)
11 a[i * 8] = b[i * 8 + 7] + 1;
12 a[i * 8 + 1] = b[i * 8 + 6] + 2;
13 a[i * 8 + 2] = b[i * 8 + 5] + 3;
14 a[i * 8 + 3] = b[i * 8 + 4] + 4;
15 a[i * 8 + 4] = b[i * 8 + 3] + 5;
16 a[i * 8 + 5] = b[i * 8 + 2] + 6;
17 a[i * 8 + 6] = b[i * 8 + 1] + 7;
18 a[i * 8 + 7] = b[i * 8 + 0] + 8;
22 /* { dg-final { scan-assembler-times {\trevb\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 1 } } */