1 /* { dg-require-effective-target vect_int } */
8 unsigned short in
[N
*8];
9 unsigned short in2
[N
*8];
16 unsigned short out
[N
*8];
17 unsigned short out2
[N
*8];
19 for (i
= 0; i
< N
*8; i
++)
22 if (y
) /* Avoid vectorization. */
26 /* SLP with unrolling by 8. */
27 for (i
= 0; i
< N
; i
++)
29 out
[i
*3] = in
[i
*3] + 5;
30 out
[i
*3 + 1] = in
[i
*3 + 1] + 6;
31 out
[i
*3 + 2] = in
[i
*3 + 2] + 16;
33 out2
[i
*5] = in2
[i
*5] + 2;
34 out2
[i
*5 + 1] = in2
[i
*5 + 1] + 2;
35 out2
[i
*5 + 2] = in2
[i
*5 + 2] + 1;
36 out2
[i
*5 + 3] = in2
[i
*5 + 3] + 3;
37 out2
[i
*5 + 4] = in2
[i
*5 + 4] + 13;
41 for (i
= 0; i
< N
; i
++)
43 if (out
[i
*3] != in
[i
*3] + 5
44 || out
[i
*3 + 1] != in
[i
*3 + 1] + 6
45 || out
[i
*3 + 2] != in
[i
*3 + 2] + 16
46 || out2
[i
*5] != in2
[i
*5] + 2
47 || out2
[i
*5 + 1] != in2
[i
*5 + 1] + 2
48 || out2
[i
*5 + 2] != in2
[i
*5 + 2] + 1
49 || out2
[i
*5 + 3] != in2
[i
*5 + 3] + 3
50 || out2
[i
*5 + 4] != in2
[i
*5 + 4] + 13)
66 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
67 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */
68 /* { dg-final { cleanup-tree-dump "vect" } } */