1 /* { dg-require-effective-target vect_int } */
8 unsigned short in
[N
*8];
9 unsigned short in2
[N
*8];
15 unsigned short out
[N
*8];
16 unsigned short out2
[N
*8];
18 for (i
= 0; i
< N
*8; i
++)
21 asm volatile ("" ::: "memory");
24 /* SLP with unrolling by 8. */
25 for (i
= 0; i
< N
; i
++)
27 out
[i
*3] = in
[i
*3] + 5;
28 out
[i
*3 + 1] = in
[i
*3 + 1] + 6;
29 out
[i
*3 + 2] = in
[i
*3 + 2] + 16;
31 out2
[i
*5] = in2
[i
*5] + 2;
32 out2
[i
*5 + 1] = in2
[i
*5 + 1] + 2;
33 out2
[i
*5 + 2] = in2
[i
*5 + 2] + 1;
34 out2
[i
*5 + 3] = in2
[i
*5 + 3] + 3;
35 out2
[i
*5 + 4] = in2
[i
*5 + 4] + 13;
40 for (i
= 0; i
< N
; i
++)
42 if (out
[i
*3] != in
[i
*3] + 5
43 || out
[i
*3 + 1] != in
[i
*3 + 1] + 6
44 || out
[i
*3 + 2] != in
[i
*3 + 2] + 16
45 || out2
[i
*5] != in2
[i
*5] + 2
46 || out2
[i
*5 + 1] != in2
[i
*5 + 1] + 2
47 || out2
[i
*5 + 2] != in2
[i
*5 + 2] + 1
48 || out2
[i
*5 + 3] != in2
[i
*5 + 3] + 3
49 || out2
[i
*5 + 4] != in2
[i
*5 + 4] + 13)
65 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
66 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target {! vect_strided5 } } } } */