1 /* { dg-require-effective-target vect_int } */
12 unsigned short out
[N
*8];
13 unsigned short in
[N
*8];
16 for (i
= 0; i
< N
*8; i
++)
19 asm volatile ("" ::: "memory");
22 for (i
= 0; i
< N
; i
++)
25 out
[i
*8 + 1] = in
[i
*8 + 1];
26 out
[i
*8 + 2] = in
[i
*8 + 2];
27 out
[i
*8 + 3] = in
[i
*8 + 3];
28 out
[i
*8 + 4] = in
[i
*8 + 4];
29 out
[i
*8 + 5] = in
[i
*8 + 5];
30 out
[i
*8 + 6] = in
[i
*8 + 6];
31 out
[i
*8 + 7] = in
[i
*8 + 7];
38 for (i
= 0; i
< N
; i
++)
40 if (out
[i
*8] != in
[i
*8]
41 || out
[i
*8 + 1] != in
[i
*8 + 1]
42 || out
[i
*8 + 2] != in
[i
*8 + 2]
43 || out
[i
*8 + 3] != in
[i
*8 + 3]
44 || out
[i
*8 + 4] != in
[i
*8 + 4]
45 || out
[i
*8 + 5] != in
[i
*8 + 5]
46 || out
[i
*8 + 6] != in
[i
*8 + 6]
47 || out
[i
*8 + 7] != in
[i
*8 + 7]
52 for (i
= 0; i
< N
*2; i
++)
55 out
[i
*4 + 1] = in
[i
*4 + 1];
56 out
[i
*4 + 2] = in
[i
*4 + 2];
57 out
[i
*4 + 3] = in
[i
*4 + 3];
64 for (i
= 0; i
< N
*2; i
++)
66 if (out
[i
*4] != in
[i
*4]
67 || out
[i
*4 + 1] != in
[i
*4 + 1]
68 || out
[i
*4 + 2] != in
[i
*4 + 2]
69 || out
[i
*4 + 3] != in
[i
*4 + 3]
74 for (i
= 0; i
< N
/2; i
++)
77 out
[i
*16 + 1] = in
[i
*16 + 1];
78 out
[i
*16 + 2] = in
[i
*16 + 2];
79 out
[i
*16 + 3] = in
[i
*16 + 3];
80 out
[i
*16 + 4] = in
[i
*16 + 4];
81 out
[i
*16 + 5] = in
[i
*16 + 5];
82 out
[i
*16 + 6] = in
[i
*16 + 6];
83 out
[i
*16 + 7] = in
[i
*16 + 7];
84 out
[i
*16 + 8] = in
[i
*16 + 8];
85 out
[i
*16 + 9] = in
[i
*16 + 9];
86 out
[i
*16 + 10] = in
[i
*16 + 10];
87 out
[i
*16 + 11] = in
[i
*16 + 11];
88 out
[i
*16 + 12] = in
[i
*16 + 12];
89 out
[i
*16 + 13] = in
[i
*16 + 13];
90 out
[i
*16 + 14] = in
[i
*16 + 14];
91 out
[i
*16 + 15] = in
[i
*16 + 15];
98 for (i
= 0; i
< N
/2; i
++)
100 if (out
[i
*16] != in
[i
*16]
101 || out
[i
*16 + 1] != in
[i
*16 + 1]
102 || out
[i
*16 + 2] != in
[i
*16 + 2]
103 || out
[i
*16 + 3] != in
[i
*16 + 3]
104 || out
[i
*16 + 4] != in
[i
*16 + 4]
105 || out
[i
*16 + 5] != in
[i
*16 + 5]
106 || out
[i
*16 + 6] != in
[i
*16 + 6]
107 || out
[i
*16 + 7] != in
[i
*16 + 7]
108 || out
[i
*16 + 8] != in
[i
*16 + 8]
109 || out
[i
*16 + 9] != in
[i
*16 + 9]
110 || out
[i
*16 + 10] != in
[i
*16 + 10]
111 || out
[i
*16 + 11] != in
[i
*16 + 11]
112 || out
[i
*16 + 12] != in
[i
*16 + 12]
113 || out
[i
*16 + 13] != in
[i
*16 + 13]
114 || out
[i
*16 + 14] != in
[i
*16 + 14]
115 || out
[i
*16 + 15] != in
[i
*16 + 15]
133 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
134 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 6 "vect" } } */