1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
3
4 #include <stdint.h>
5
6 void
f(uint8_t * restrict a,uint8_t * restrict b)7 f (uint8_t *restrict a, uint8_t *restrict b)
8 {
9 for (int i = 0; i < 100; ++i)
10 {
11 a[i * 8] = b[i * 8 + 3] + 1;
12 a[i * 8 + 1] = b[i * 8 + 6] + 1;
13 a[i * 8 + 2] = b[i * 8 + 0] + 1;
14 a[i * 8 + 3] = b[i * 8 + 2] + 1;
15 a[i * 8 + 4] = b[i * 8 + 1] + 1;
16 a[i * 8 + 5] = b[i * 8 + 7] + 1;
17 a[i * 8 + 6] = b[i * 8 + 5] + 1;
18 a[i * 8 + 7] = b[i * 8 + 4] + 1;
19 }
20 }
21
22 /* { dg-final { scan-assembler-times {\ttbl\tz[0-9]+\.b, z[0-9]+\.b, z[0-9]+\.b\n} 1 } } */
23