1 /* { dg-require-effective-target vect_int } */
9 main1 (unsigned short a0
, unsigned short a1
, unsigned short a2
,
10 unsigned short a3
, unsigned short a4
, unsigned short a5
,
11 unsigned short a6
, unsigned short a7
, unsigned short a8
,
12 unsigned short a9
, unsigned short a10
, unsigned short a11
,
13 unsigned short a12
, unsigned short a13
, unsigned short a14
,
17 unsigned short out
[N
*16];
19 for (i
= 0; i
< N
; i
++)
28 for (i
= 0; i
< N
; i
++)
33 || out
[i
*4 + 3] != a3
)
37 for (i
= 0; i
< N
; i
++)
58 for (i
= 0; i
< N
; i
++)
61 || out
[i
*16 + 1] != a7
62 || out
[i
*16 + 2] != a1
63 || out
[i
*16 + 3] != a2
64 || out
[i
*16 + 4] != a8
65 || out
[i
*16 + 5] != a5
66 || out
[i
*16 + 6] != a5
67 || out
[i
*16 + 7] != a4
68 || out
[i
*16 + 8] != a12
69 || out
[i
*16 + 9] != a13
70 || out
[i
*16 + 10] != a14
71 || out
[i
*16 + 11] != a15
72 || out
[i
*16 + 12] != a6
73 || out
[i
*16 + 13] != a9
74 || out
[i
*16 + 14] != a0
75 || out
[i
*16 + 15] != a7
)
79 /* SLP with unrolling by 8. */
80 for (i
= 0; i
< N
; i
++)
88 for (i
= 0; i
< N
; i
++)
92 || out
[i
*3 + 2] != a2
)
96 /* SLP with unrolling by 8. */
97 for (i
= 0; i
< N
; i
++)
109 out
[i
*11 + 10] = a14
;
113 for (i
= 0; i
< N
; i
++)
116 || out
[i
*11 + 1] != a7
117 || out
[i
*11 + 2] != a1
118 || out
[i
*11 + 3] != a2
119 || out
[i
*11 + 4] != a8
120 || out
[i
*11 + 5] != a5
121 || out
[i
*11 + 6] != a5
122 || out
[i
*11 + 7] != a4
123 || out
[i
*11 + 8] != a12
124 || out
[i
*11 + 9] != a13
125 || out
[i
*11 + 10] != a14
)
137 main1 (15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
142 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
143 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */
144 /* { dg-final { cleanup-tree-dump "vect" } } */