Implement AArch64 Neon instruction set Perm.
[oota-llvm.git] / test / CodeGen / AArch64 / neon-perm.ll
1 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s
2
3 %struct.int8x8x2_t = type { [2 x <8 x i8>] }
4 %struct.int16x4x2_t = type { [2 x <4 x i16>] }
5 %struct.int32x2x2_t = type { [2 x <2 x i32>] }
6 %struct.uint8x8x2_t = type { [2 x <8 x i8>] }
7 %struct.uint16x4x2_t = type { [2 x <4 x i16>] }
8 %struct.uint32x2x2_t = type { [2 x <2 x i32>] }
9 %struct.float32x2x2_t = type { [2 x <2 x float>] }
10 %struct.poly8x8x2_t = type { [2 x <8 x i8>] }
11 %struct.poly16x4x2_t = type { [2 x <4 x i16>] }
12 %struct.int8x16x2_t = type { [2 x <16 x i8>] }
13 %struct.int16x8x2_t = type { [2 x <8 x i16>] }
14 %struct.int32x4x2_t = type { [2 x <4 x i32>] }
15 %struct.uint8x16x2_t = type { [2 x <16 x i8>] }
16 %struct.uint16x8x2_t = type { [2 x <8 x i16>] }
17 %struct.uint32x4x2_t = type { [2 x <4 x i32>] }
18 %struct.float32x4x2_t = type { [2 x <4 x float>] }
19 %struct.poly8x16x2_t = type { [2 x <16 x i8>] }
20 %struct.poly16x8x2_t = type { [2 x <8 x i16>] }
21
22 define <8 x i8> @test_vuzp1_s8(<8 x i8> %a, <8 x i8> %b) {
23 ; CHECK: test_vuzp1_s8:
24 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
25 entry:
26   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
27   ret <8 x i8> %shuffle.i
28 }
29
30 define <16 x i8> @test_vuzp1q_s8(<16 x i8> %a, <16 x i8> %b) {
31 ; CHECK: test_vuzp1q_s8:
32 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
33 entry:
34   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
35   ret <16 x i8> %shuffle.i
36 }
37
38 define <4 x i16> @test_vuzp1_s16(<4 x i16> %a, <4 x i16> %b) {
39 ; CHECK: test_vuzp1_s16:
40 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
41 entry:
42   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
43   ret <4 x i16> %shuffle.i
44 }
45
46 define <8 x i16> @test_vuzp1q_s16(<8 x i16> %a, <8 x i16> %b) {
47 ; CHECK: test_vuzp1q_s16:
48 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
49 entry:
50   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
51   ret <8 x i16> %shuffle.i
52 }
53
54 define <2 x i32> @test_vuzp1_s32(<2 x i32> %a, <2 x i32> %b) {
55 ; CHECK: test_vuzp1_s32:
56 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
57 entry:
58   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
59   ret <2 x i32> %shuffle.i
60 }
61
62 define <4 x i32> @test_vuzp1q_s32(<4 x i32> %a, <4 x i32> %b) {
63 ; CHECK: test_vuzp1q_s32:
64 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
65 entry:
66   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
67   ret <4 x i32> %shuffle.i
68 }
69
70 define <2 x i64> @test_vuzp1q_s64(<2 x i64> %a, <2 x i64> %b) {
71 ; CHECK: test_vuzp1q_s64:
72 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
73 entry:
74   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
75   ret <2 x i64> %shuffle.i
76 }
77
78 define <8 x i8> @test_vuzp1_u8(<8 x i8> %a, <8 x i8> %b) {
79 ; CHECK: test_vuzp1_u8:
80 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
81 entry:
82   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
83   ret <8 x i8> %shuffle.i
84 }
85
86 define <16 x i8> @test_vuzp1q_u8(<16 x i8> %a, <16 x i8> %b) {
87 ; CHECK: test_vuzp1q_u8:
88 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
89 entry:
90   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
91   ret <16 x i8> %shuffle.i
92 }
93
94 define <4 x i16> @test_vuzp1_u16(<4 x i16> %a, <4 x i16> %b) {
95 ; CHECK: test_vuzp1_u16:
96 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
97 entry:
98   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
99   ret <4 x i16> %shuffle.i
100 }
101
102 define <8 x i16> @test_vuzp1q_u16(<8 x i16> %a, <8 x i16> %b) {
103 ; CHECK: test_vuzp1q_u16:
104 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
105 entry:
106   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
107   ret <8 x i16> %shuffle.i
108 }
109
110 define <2 x i32> @test_vuzp1_u32(<2 x i32> %a, <2 x i32> %b) {
111 ; CHECK: test_vuzp1_u32:
112 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
113 entry:
114   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
115   ret <2 x i32> %shuffle.i
116 }
117
118 define <4 x i32> @test_vuzp1q_u32(<4 x i32> %a, <4 x i32> %b) {
119 ; CHECK: test_vuzp1q_u32:
120 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
121 entry:
122   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
123   ret <4 x i32> %shuffle.i
124 }
125
126 define <2 x i64> @test_vuzp1q_u64(<2 x i64> %a, <2 x i64> %b) {
127 ; CHECK: test_vuzp1q_u64:
128 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
129 entry:
130   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
131   ret <2 x i64> %shuffle.i
132 }
133
134 define <2 x float> @test_vuzp1_f32(<2 x float> %a, <2 x float> %b) {
135 ; CHECK: test_vuzp1_f32:
136 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
137 entry:
138   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
139   ret <2 x float> %shuffle.i
140 }
141
142 define <4 x float> @test_vuzp1q_f32(<4 x float> %a, <4 x float> %b) {
143 ; CHECK: test_vuzp1q_f32:
144 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
145 entry:
146   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
147   ret <4 x float> %shuffle.i
148 }
149
150 define <2 x double> @test_vuzp1q_f64(<2 x double> %a, <2 x double> %b) {
151 ; CHECK: test_vuzp1q_f64:
152 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
153 entry:
154   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 0, i32 2>
155   ret <2 x double> %shuffle.i
156 }
157
158 define <8 x i8> @test_vuzp1_p8(<8 x i8> %a, <8 x i8> %b) {
159 ; CHECK: test_vuzp1_p8:
160 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
161 entry:
162   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
163   ret <8 x i8> %shuffle.i
164 }
165
166 define <16 x i8> @test_vuzp1q_p8(<16 x i8> %a, <16 x i8> %b) {
167 ; CHECK: test_vuzp1q_p8:
168 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
169 entry:
170   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
171   ret <16 x i8> %shuffle.i
172 }
173
174 define <4 x i16> @test_vuzp1_p16(<4 x i16> %a, <4 x i16> %b) {
175 ; CHECK: test_vuzp1_p16:
176 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
177 entry:
178   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
179   ret <4 x i16> %shuffle.i
180 }
181
182 define <8 x i16> @test_vuzp1q_p16(<8 x i16> %a, <8 x i16> %b) {
183 ; CHECK: test_vuzp1q_p16:
184 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
185 entry:
186   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
187   ret <8 x i16> %shuffle.i
188 }
189
190 define <8 x i8> @test_vuzp2_s8(<8 x i8> %a, <8 x i8> %b) {
191 ; CHECK: test_vuzp2_s8:
192 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
193 entry:
194   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
195   ret <8 x i8> %shuffle.i
196 }
197
198 define <16 x i8> @test_vuzp2q_s8(<16 x i8> %a, <16 x i8> %b) {
199 ; CHECK: test_vuzp2q_s8:
200 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
201 entry:
202   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
203   ret <16 x i8> %shuffle.i
204 }
205
206 define <4 x i16> @test_vuzp2_s16(<4 x i16> %a, <4 x i16> %b) {
207 ; CHECK: test_vuzp2_s16:
208 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
209 entry:
210   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
211   ret <4 x i16> %shuffle.i
212 }
213
214 define <8 x i16> @test_vuzp2q_s16(<8 x i16> %a, <8 x i16> %b) {
215 ; CHECK: test_vuzp2q_s16:
216 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
217 entry:
218   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
219   ret <8 x i16> %shuffle.i
220 }
221
222 define <2 x i32> @test_vuzp2_s32(<2 x i32> %a, <2 x i32> %b) {
223 ; CHECK: test_vuzp2_s32:
224 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
225 entry:
226   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
227   ret <2 x i32> %shuffle.i
228 }
229
230 define <4 x i32> @test_vuzp2q_s32(<4 x i32> %a, <4 x i32> %b) {
231 ; CHECK: test_vuzp2q_s32:
232 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
233 entry:
234   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
235   ret <4 x i32> %shuffle.i
236 }
237
238 define <2 x i64> @test_vuzp2q_s64(<2 x i64> %a, <2 x i64> %b) {
239 ; CHECK: test_vuzp2q_s64:
240 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
241 entry:
242   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
243   ret <2 x i64> %shuffle.i
244 }
245
246 define <8 x i8> @test_vuzp2_u8(<8 x i8> %a, <8 x i8> %b) {
247 ; CHECK: test_vuzp2_u8:
248 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
249 entry:
250   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
251   ret <8 x i8> %shuffle.i
252 }
253
254 define <16 x i8> @test_vuzp2q_u8(<16 x i8> %a, <16 x i8> %b) {
255 ; CHECK: test_vuzp2q_u8:
256 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
257 entry:
258   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
259   ret <16 x i8> %shuffle.i
260 }
261
262 define <4 x i16> @test_vuzp2_u16(<4 x i16> %a, <4 x i16> %b) {
263 ; CHECK: test_vuzp2_u16:
264 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
265 entry:
266   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
267   ret <4 x i16> %shuffle.i
268 }
269
270 define <8 x i16> @test_vuzp2q_u16(<8 x i16> %a, <8 x i16> %b) {
271 ; CHECK: test_vuzp2q_u16:
272 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
273 entry:
274   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
275   ret <8 x i16> %shuffle.i
276 }
277
278 define <2 x i32> @test_vuzp2_u32(<2 x i32> %a, <2 x i32> %b) {
279 ; CHECK: test_vuzp2_u32:
280 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
281 entry:
282   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
283   ret <2 x i32> %shuffle.i
284 }
285
286 define <4 x i32> @test_vuzp2q_u32(<4 x i32> %a, <4 x i32> %b) {
287 ; CHECK: test_vuzp2q_u32:
288 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
289 entry:
290   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
291   ret <4 x i32> %shuffle.i
292 }
293
294 define <2 x i64> @test_vuzp2q_u64(<2 x i64> %a, <2 x i64> %b) {
295 ; CHECK: test_vuzp2q_u64:
296 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
297 entry:
298   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
299   ret <2 x i64> %shuffle.i
300 }
301
302 define <2 x float> @test_vuzp2_f32(<2 x float> %a, <2 x float> %b) {
303 ; CHECK: test_vuzp2_f32:
304 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
305 entry:
306   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
307   ret <2 x float> %shuffle.i
308 }
309
310 define <4 x float> @test_vuzp2q_f32(<4 x float> %a, <4 x float> %b) {
311 ; CHECK: test_vuzp2q_f32:
312 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
313 entry:
314   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
315   ret <4 x float> %shuffle.i
316 }
317
318 define <2 x double> @test_vuzp2q_f64(<2 x double> %a, <2 x double> %b) {
319 ; CHECK: test_vuzp2q_f64:
320 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
321 entry:
322   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 1, i32 3>
323   ret <2 x double> %shuffle.i
324 }
325
326 define <8 x i8> @test_vuzp2_p8(<8 x i8> %a, <8 x i8> %b) {
327 ; CHECK: test_vuzp2_p8:
328 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
329 entry:
330   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
331   ret <8 x i8> %shuffle.i
332 }
333
334 define <16 x i8> @test_vuzp2q_p8(<16 x i8> %a, <16 x i8> %b) {
335 ; CHECK: test_vuzp2q_p8:
336 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
337 entry:
338   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
339   ret <16 x i8> %shuffle.i
340 }
341
342 define <4 x i16> @test_vuzp2_p16(<4 x i16> %a, <4 x i16> %b) {
343 ; CHECK: test_vuzp2_p16:
344 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
345 entry:
346   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
347   ret <4 x i16> %shuffle.i
348 }
349
350 define <8 x i16> @test_vuzp2q_p16(<8 x i16> %a, <8 x i16> %b) {
351 ; CHECK: test_vuzp2q_p16:
352 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
353 entry:
354   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
355   ret <8 x i16> %shuffle.i
356 }
357
358 define <8 x i8> @test_vzip1_s8(<8 x i8> %a, <8 x i8> %b) {
359 ; CHECK: test_vzip1_s8:
360 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
361 entry:
362   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
363   ret <8 x i8> %shuffle.i
364 }
365
366 define <16 x i8> @test_vzip1q_s8(<16 x i8> %a, <16 x i8> %b) {
367 ; CHECK: test_vzip1q_s8:
368 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
369 entry:
370   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
371   ret <16 x i8> %shuffle.i
372 }
373
374 define <4 x i16> @test_vzip1_s16(<4 x i16> %a, <4 x i16> %b) {
375 ; CHECK: test_vzip1_s16:
376 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
377 entry:
378   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
379   ret <4 x i16> %shuffle.i
380 }
381
382 define <8 x i16> @test_vzip1q_s16(<8 x i16> %a, <8 x i16> %b) {
383 ; CHECK: test_vzip1q_s16:
384 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
385 entry:
386   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
387   ret <8 x i16> %shuffle.i
388 }
389
390 define <2 x i32> @test_vzip1_s32(<2 x i32> %a, <2 x i32> %b) {
391 ; CHECK: test_vzip1_s32:
392 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
393 entry:
394   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
395   ret <2 x i32> %shuffle.i
396 }
397
398 define <4 x i32> @test_vzip1q_s32(<4 x i32> %a, <4 x i32> %b) {
399 ; CHECK: test_vzip1q_s32:
400 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
401 entry:
402   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
403   ret <4 x i32> %shuffle.i
404 }
405
406 define <2 x i64> @test_vzip1q_s64(<2 x i64> %a, <2 x i64> %b) {
407 ; CHECK: test_vzip1q_s64:
408 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
409 entry:
410   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
411   ret <2 x i64> %shuffle.i
412 }
413
414 define <8 x i8> @test_vzip1_u8(<8 x i8> %a, <8 x i8> %b) {
415 ; CHECK: test_vzip1_u8:
416 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
417 entry:
418   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
419   ret <8 x i8> %shuffle.i
420 }
421
422 define <16 x i8> @test_vzip1q_u8(<16 x i8> %a, <16 x i8> %b) {
423 ; CHECK: test_vzip1q_u8:
424 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
425 entry:
426   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
427   ret <16 x i8> %shuffle.i
428 }
429
430 define <4 x i16> @test_vzip1_u16(<4 x i16> %a, <4 x i16> %b) {
431 ; CHECK: test_vzip1_u16:
432 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
433 entry:
434   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
435   ret <4 x i16> %shuffle.i
436 }
437
438 define <8 x i16> @test_vzip1q_u16(<8 x i16> %a, <8 x i16> %b) {
439 ; CHECK: test_vzip1q_u16:
440 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
441 entry:
442   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
443   ret <8 x i16> %shuffle.i
444 }
445
446 define <2 x i32> @test_vzip1_u32(<2 x i32> %a, <2 x i32> %b) {
447 ; CHECK: test_vzip1_u32:
448 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
449 entry:
450   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
451   ret <2 x i32> %shuffle.i
452 }
453
454 define <4 x i32> @test_vzip1q_u32(<4 x i32> %a, <4 x i32> %b) {
455 ; CHECK: test_vzip1q_u32:
456 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
457 entry:
458   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
459   ret <4 x i32> %shuffle.i
460 }
461
462 define <2 x i64> @test_vzip1q_u64(<2 x i64> %a, <2 x i64> %b) {
463 ; CHECK: test_vzip1q_u64:
464 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
465 entry:
466   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
467   ret <2 x i64> %shuffle.i
468 }
469
470 define <2 x float> @test_vzip1_f32(<2 x float> %a, <2 x float> %b) {
471 ; CHECK: test_vzip1_f32:
472 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
473 entry:
474   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
475   ret <2 x float> %shuffle.i
476 }
477
478 define <4 x float> @test_vzip1q_f32(<4 x float> %a, <4 x float> %b) {
479 ; CHECK: test_vzip1q_f32:
480 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
481 entry:
482   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
483   ret <4 x float> %shuffle.i
484 }
485
486 define <2 x double> @test_vzip1q_f64(<2 x double> %a, <2 x double> %b) {
487 ; CHECK: test_vzip1q_f64:
488 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
489 entry:
490   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 0, i32 2>
491   ret <2 x double> %shuffle.i
492 }
493
494 define <8 x i8> @test_vzip1_p8(<8 x i8> %a, <8 x i8> %b) {
495 ; CHECK: test_vzip1_p8:
496 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
497 entry:
498   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
499   ret <8 x i8> %shuffle.i
500 }
501
502 define <16 x i8> @test_vzip1q_p8(<16 x i8> %a, <16 x i8> %b) {
503 ; CHECK: test_vzip1q_p8:
504 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
505 entry:
506   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
507   ret <16 x i8> %shuffle.i
508 }
509
510 define <4 x i16> @test_vzip1_p16(<4 x i16> %a, <4 x i16> %b) {
511 ; CHECK: test_vzip1_p16:
512 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
513 entry:
514   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
515   ret <4 x i16> %shuffle.i
516 }
517
518 define <8 x i16> @test_vzip1q_p16(<8 x i16> %a, <8 x i16> %b) {
519 ; CHECK: test_vzip1q_p16:
520 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
521 entry:
522   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
523   ret <8 x i16> %shuffle.i
524 }
525
526 define <8 x i8> @test_vzip2_s8(<8 x i8> %a, <8 x i8> %b) {
527 ; CHECK: test_vzip2_s8:
528 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
529 entry:
530   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
531   ret <8 x i8> %shuffle.i
532 }
533
534 define <16 x i8> @test_vzip2q_s8(<16 x i8> %a, <16 x i8> %b) {
535 ; CHECK: test_vzip2q_s8:
536 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
537 entry:
538   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
539   ret <16 x i8> %shuffle.i
540 }
541
542 define <4 x i16> @test_vzip2_s16(<4 x i16> %a, <4 x i16> %b) {
543 ; CHECK: test_vzip2_s16:
544 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
545 entry:
546   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
547   ret <4 x i16> %shuffle.i
548 }
549
550 define <8 x i16> @test_vzip2q_s16(<8 x i16> %a, <8 x i16> %b) {
551 ; CHECK: test_vzip2q_s16:
552 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
553 entry:
554   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
555   ret <8 x i16> %shuffle.i
556 }
557
558 define <2 x i32> @test_vzip2_s32(<2 x i32> %a, <2 x i32> %b) {
559 ; CHECK: test_vzip2_s32:
560 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
561 entry:
562   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
563   ret <2 x i32> %shuffle.i
564 }
565
566 define <4 x i32> @test_vzip2q_s32(<4 x i32> %a, <4 x i32> %b) {
567 ; CHECK: test_vzip2q_s32:
568 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
569 entry:
570   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
571   ret <4 x i32> %shuffle.i
572 }
573
574 define <2 x i64> @test_vzip2q_s64(<2 x i64> %a, <2 x i64> %b) {
575 ; CHECK: test_vzip2q_s64:
576 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
577 entry:
578   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
579   ret <2 x i64> %shuffle.i
580 }
581
582 define <8 x i8> @test_vzip2_u8(<8 x i8> %a, <8 x i8> %b) {
583 ; CHECK: test_vzip2_u8:
584 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
585 entry:
586   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
587   ret <8 x i8> %shuffle.i
588 }
589
590 define <16 x i8> @test_vzip2q_u8(<16 x i8> %a, <16 x i8> %b) {
591 ; CHECK: test_vzip2q_u8:
592 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
593 entry:
594   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
595   ret <16 x i8> %shuffle.i
596 }
597
598 define <4 x i16> @test_vzip2_u16(<4 x i16> %a, <4 x i16> %b) {
599 ; CHECK: test_vzip2_u16:
600 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
601 entry:
602   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
603   ret <4 x i16> %shuffle.i
604 }
605
606 define <8 x i16> @test_vzip2q_u16(<8 x i16> %a, <8 x i16> %b) {
607 ; CHECK: test_vzip2q_u16:
608 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
609 entry:
610   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
611   ret <8 x i16> %shuffle.i
612 }
613
614 define <2 x i32> @test_vzip2_u32(<2 x i32> %a, <2 x i32> %b) {
615 ; CHECK: test_vzip2_u32:
616 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
617 entry:
618   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
619   ret <2 x i32> %shuffle.i
620 }
621
622 define <4 x i32> @test_vzip2q_u32(<4 x i32> %a, <4 x i32> %b) {
623 ; CHECK: test_vzip2q_u32:
624 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
625 entry:
626   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
627   ret <4 x i32> %shuffle.i
628 }
629
630 define <2 x i64> @test_vzip2q_u64(<2 x i64> %a, <2 x i64> %b) {
631 ; CHECK: test_vzip2q_u64:
632 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
633 entry:
634   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
635   ret <2 x i64> %shuffle.i
636 }
637
638 define <2 x float> @test_vzip2_f32(<2 x float> %a, <2 x float> %b) {
639 ; CHECK: test_vzip2_f32:
640 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
641 entry:
642   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
643   ret <2 x float> %shuffle.i
644 }
645
646 define <4 x float> @test_vzip2q_f32(<4 x float> %a, <4 x float> %b) {
647 ; CHECK: test_vzip2q_f32:
648 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
649 entry:
650   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
651   ret <4 x float> %shuffle.i
652 }
653
654 define <2 x double> @test_vzip2q_f64(<2 x double> %a, <2 x double> %b) {
655 ; CHECK: test_vzip2q_f64:
656 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
657 entry:
658   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 1, i32 3>
659   ret <2 x double> %shuffle.i
660 }
661
662 define <8 x i8> @test_vzip2_p8(<8 x i8> %a, <8 x i8> %b) {
663 ; CHECK: test_vzip2_p8:
664 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
665 entry:
666   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
667   ret <8 x i8> %shuffle.i
668 }
669
670 define <16 x i8> @test_vzip2q_p8(<16 x i8> %a, <16 x i8> %b) {
671 ; CHECK: test_vzip2q_p8:
672 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
673 entry:
674   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
675   ret <16 x i8> %shuffle.i
676 }
677
678 define <4 x i16> @test_vzip2_p16(<4 x i16> %a, <4 x i16> %b) {
679 ; CHECK: test_vzip2_p16:
680 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
681 entry:
682   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
683   ret <4 x i16> %shuffle.i
684 }
685
686 define <8 x i16> @test_vzip2q_p16(<8 x i16> %a, <8 x i16> %b) {
687 ; CHECK: test_vzip2q_p16:
688 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
689 entry:
690   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
691   ret <8 x i16> %shuffle.i
692 }
693
694 define <8 x i8> @test_vtrn1_s8(<8 x i8> %a, <8 x i8> %b) {
695 ; CHECK: test_vtrn1_s8:
696 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
697 entry:
698   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
699   ret <8 x i8> %shuffle.i
700 }
701
702 define <16 x i8> @test_vtrn1q_s8(<16 x i8> %a, <16 x i8> %b) {
703 ; CHECK: test_vtrn1q_s8:
704 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
705 entry:
706   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
707   ret <16 x i8> %shuffle.i
708 }
709
710 define <4 x i16> @test_vtrn1_s16(<4 x i16> %a, <4 x i16> %b) {
711 ; CHECK: test_vtrn1_s16:
712 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
713 entry:
714   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
715   ret <4 x i16> %shuffle.i
716 }
717
718 define <8 x i16> @test_vtrn1q_s16(<8 x i16> %a, <8 x i16> %b) {
719 ; CHECK: test_vtrn1q_s16:
720 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
721 entry:
722   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
723   ret <8 x i16> %shuffle.i
724 }
725
726 define <2 x i32> @test_vtrn1_s32(<2 x i32> %a, <2 x i32> %b) {
727 ; CHECK: test_vtrn1_s32:
728 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
729 entry:
730   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
731   ret <2 x i32> %shuffle.i
732 }
733
734 define <4 x i32> @test_vtrn1q_s32(<4 x i32> %a, <4 x i32> %b) {
735 ; CHECK: test_vtrn1q_s32:
736 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
737 entry:
738   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
739   ret <4 x i32> %shuffle.i
740 }
741
742 define <2 x i64> @test_vtrn1q_s64(<2 x i64> %a, <2 x i64> %b) {
743 ; CHECK: test_vtrn1q_s64:
744 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
745 entry:
746   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
747   ret <2 x i64> %shuffle.i
748 }
749
750 define <8 x i8> @test_vtrn1_u8(<8 x i8> %a, <8 x i8> %b) {
751 ; CHECK: test_vtrn1_u8:
752 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
753 entry:
754   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
755   ret <8 x i8> %shuffle.i
756 }
757
758 define <16 x i8> @test_vtrn1q_u8(<16 x i8> %a, <16 x i8> %b) {
759 ; CHECK: test_vtrn1q_u8:
760 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
761 entry:
762   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
763   ret <16 x i8> %shuffle.i
764 }
765
766 define <4 x i16> @test_vtrn1_u16(<4 x i16> %a, <4 x i16> %b) {
767 ; CHECK: test_vtrn1_u16:
768 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
769 entry:
770   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
771   ret <4 x i16> %shuffle.i
772 }
773
774 define <8 x i16> @test_vtrn1q_u16(<8 x i16> %a, <8 x i16> %b) {
775 ; CHECK: test_vtrn1q_u16:
776 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
777 entry:
778   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
779   ret <8 x i16> %shuffle.i
780 }
781
782 define <2 x i32> @test_vtrn1_u32(<2 x i32> %a, <2 x i32> %b) {
783 ; CHECK: test_vtrn1_u32:
784 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
785 entry:
786   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
787   ret <2 x i32> %shuffle.i
788 }
789
790 define <4 x i32> @test_vtrn1q_u32(<4 x i32> %a, <4 x i32> %b) {
791 ; CHECK: test_vtrn1q_u32:
792 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
793 entry:
794   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
795   ret <4 x i32> %shuffle.i
796 }
797
798 define <2 x i64> @test_vtrn1q_u64(<2 x i64> %a, <2 x i64> %b) {
799 ; CHECK: test_vtrn1q_u64:
800 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
801 entry:
802   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
803   ret <2 x i64> %shuffle.i
804 }
805
806 define <2 x float> @test_vtrn1_f32(<2 x float> %a, <2 x float> %b) {
807 ; CHECK: test_vtrn1_f32:
808 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
809 entry:
810   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
811   ret <2 x float> %shuffle.i
812 }
813
814 define <4 x float> @test_vtrn1q_f32(<4 x float> %a, <4 x float> %b) {
815 ; CHECK: test_vtrn1q_f32:
816 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
817 entry:
818   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
819   ret <4 x float> %shuffle.i
820 }
821
822 define <2 x double> @test_vtrn1q_f64(<2 x double> %a, <2 x double> %b) {
823 ; CHECK: test_vtrn1q_f64:
824 ; CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
825 entry:
826   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 0, i32 2>
827   ret <2 x double> %shuffle.i
828 }
829
830 define <8 x i8> @test_vtrn1_p8(<8 x i8> %a, <8 x i8> %b) {
831 ; CHECK: test_vtrn1_p8:
832 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
833 entry:
834   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
835   ret <8 x i8> %shuffle.i
836 }
837
838 define <16 x i8> @test_vtrn1q_p8(<16 x i8> %a, <16 x i8> %b) {
839 ; CHECK: test_vtrn1q_p8:
840 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
841 entry:
842   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
843   ret <16 x i8> %shuffle.i
844 }
845
846 define <4 x i16> @test_vtrn1_p16(<4 x i16> %a, <4 x i16> %b) {
847 ; CHECK: test_vtrn1_p16:
848 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
849 entry:
850   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
851   ret <4 x i16> %shuffle.i
852 }
853
854 define <8 x i16> @test_vtrn1q_p16(<8 x i16> %a, <8 x i16> %b) {
855 ; CHECK: test_vtrn1q_p16:
856 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
857 entry:
858   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
859   ret <8 x i16> %shuffle.i
860 }
861
862 define <8 x i8> @test_vtrn2_s8(<8 x i8> %a, <8 x i8> %b) {
863 ; CHECK: test_vtrn2_s8:
864 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
865 entry:
866   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
867   ret <8 x i8> %shuffle.i
868 }
869
870 define <16 x i8> @test_vtrn2q_s8(<16 x i8> %a, <16 x i8> %b) {
871 ; CHECK: test_vtrn2q_s8:
872 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
873 entry:
874   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
875   ret <16 x i8> %shuffle.i
876 }
877
878 define <4 x i16> @test_vtrn2_s16(<4 x i16> %a, <4 x i16> %b) {
879 ; CHECK: test_vtrn2_s16:
880 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
881 entry:
882   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
883   ret <4 x i16> %shuffle.i
884 }
885
886 define <8 x i16> @test_vtrn2q_s16(<8 x i16> %a, <8 x i16> %b) {
887 ; CHECK: test_vtrn2q_s16:
888 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
889 entry:
890   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
891   ret <8 x i16> %shuffle.i
892 }
893
894 define <2 x i32> @test_vtrn2_s32(<2 x i32> %a, <2 x i32> %b) {
895 ; CHECK: test_vtrn2_s32:
896 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
897 entry:
898   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
899   ret <2 x i32> %shuffle.i
900 }
901
902 define <4 x i32> @test_vtrn2q_s32(<4 x i32> %a, <4 x i32> %b) {
903 ; CHECK: test_vtrn2q_s32:
904 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
905 entry:
906   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
907   ret <4 x i32> %shuffle.i
908 }
909
910 define <2 x i64> @test_vtrn2q_s64(<2 x i64> %a, <2 x i64> %b) {
911 ; CHECK: test_vtrn2q_s64:
912 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
913 entry:
914   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
915   ret <2 x i64> %shuffle.i
916 }
917
918 define <8 x i8> @test_vtrn2_u8(<8 x i8> %a, <8 x i8> %b) {
919 ; CHECK: test_vtrn2_u8:
920 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
921 entry:
922   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
923   ret <8 x i8> %shuffle.i
924 }
925
926 define <16 x i8> @test_vtrn2q_u8(<16 x i8> %a, <16 x i8> %b) {
927 ; CHECK: test_vtrn2q_u8:
928 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
929 entry:
930   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
931   ret <16 x i8> %shuffle.i
932 }
933
934 define <4 x i16> @test_vtrn2_u16(<4 x i16> %a, <4 x i16> %b) {
935 ; CHECK: test_vtrn2_u16:
936 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
937 entry:
938   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
939   ret <4 x i16> %shuffle.i
940 }
941
942 define <8 x i16> @test_vtrn2q_u16(<8 x i16> %a, <8 x i16> %b) {
943 ; CHECK: test_vtrn2q_u16:
944 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
945 entry:
946   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
947   ret <8 x i16> %shuffle.i
948 }
949
950 define <2 x i32> @test_vtrn2_u32(<2 x i32> %a, <2 x i32> %b) {
951 ; CHECK: test_vtrn2_u32:
952 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
953 entry:
954   %shuffle.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
955   ret <2 x i32> %shuffle.i
956 }
957
958 define <4 x i32> @test_vtrn2q_u32(<4 x i32> %a, <4 x i32> %b) {
959 ; CHECK: test_vtrn2q_u32:
960 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
961 entry:
962   %shuffle.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
963   ret <4 x i32> %shuffle.i
964 }
965
966 define <2 x i64> @test_vtrn2q_u64(<2 x i64> %a, <2 x i64> %b) {
967 ; CHECK: test_vtrn2q_u64:
968 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
969 entry:
970   %shuffle.i = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
971   ret <2 x i64> %shuffle.i
972 }
973
974 define <2 x float> @test_vtrn2_f32(<2 x float> %a, <2 x float> %b) {
975 ; CHECK: test_vtrn2_f32:
976 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
977 entry:
978   %shuffle.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
979   ret <2 x float> %shuffle.i
980 }
981
982 define <4 x float> @test_vtrn2q_f32(<4 x float> %a, <4 x float> %b) {
983 ; CHECK: test_vtrn2q_f32:
984 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
985 entry:
986   %shuffle.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
987   ret <4 x float> %shuffle.i
988 }
989
990 define <2 x double> @test_vtrn2q_f64(<2 x double> %a, <2 x double> %b) {
991 ; CHECK: test_vtrn2q_f64:
992 ; CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
993 entry:
994   %shuffle.i = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 1, i32 3>
995   ret <2 x double> %shuffle.i
996 }
997
998 define <8 x i8> @test_vtrn2_p8(<8 x i8> %a, <8 x i8> %b) {
999 ; CHECK: test_vtrn2_p8:
1000 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1001 entry:
1002   %shuffle.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1003   ret <8 x i8> %shuffle.i
1004 }
1005
1006 define <16 x i8> @test_vtrn2q_p8(<16 x i8> %a, <16 x i8> %b) {
1007 ; CHECK: test_vtrn2q_p8:
1008 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1009 entry:
1010   %shuffle.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
1011   ret <16 x i8> %shuffle.i
1012 }
1013
1014 define <4 x i16> @test_vtrn2_p16(<4 x i16> %a, <4 x i16> %b) {
1015 ; CHECK: test_vtrn2_p16:
1016 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1017 entry:
1018   %shuffle.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1019   ret <4 x i16> %shuffle.i
1020 }
1021
1022 define <8 x i16> @test_vtrn2q_p16(<8 x i16> %a, <8 x i16> %b) {
1023 ; CHECK: test_vtrn2q_p16:
1024 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1025 entry:
1026   %shuffle.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1027   ret <8 x i16> %shuffle.i
1028 }
1029
1030 define %struct.int8x8x2_t @test_vuzp_s8(<8 x i8> %a, <8 x i8> %b) {
1031 ; CHECK: test_vuzp_s8:
1032 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1033 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1034 entry:
1035   %vuzp.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1036   %vuzp1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1037   %.fca.0.0.insert = insertvalue %struct.int8x8x2_t undef, <8 x i8> %vuzp.i, 0, 0
1038   %.fca.0.1.insert = insertvalue %struct.int8x8x2_t %.fca.0.0.insert, <8 x i8> %vuzp1.i, 0, 1
1039   ret %struct.int8x8x2_t %.fca.0.1.insert
1040 }
1041
1042 define %struct.int16x4x2_t @test_vuzp_s16(<4 x i16> %a, <4 x i16> %b) {
1043 ; CHECK: test_vuzp_s16:
1044 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1045 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1046 entry:
1047   %vuzp.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1048   %vuzp1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1049   %.fca.0.0.insert = insertvalue %struct.int16x4x2_t undef, <4 x i16> %vuzp.i, 0, 0
1050   %.fca.0.1.insert = insertvalue %struct.int16x4x2_t %.fca.0.0.insert, <4 x i16> %vuzp1.i, 0, 1
1051   ret %struct.int16x4x2_t %.fca.0.1.insert
1052 }
1053
1054 define %struct.int32x2x2_t @test_vuzp_s32(<2 x i32> %a, <2 x i32> %b) {
1055 ; CHECK: test_vuzp_s32:
1056 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1057 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1058 entry:
1059   %vuzp.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1060   %vuzp1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1061   %.fca.0.0.insert = insertvalue %struct.int32x2x2_t undef, <2 x i32> %vuzp.i, 0, 0
1062   %.fca.0.1.insert = insertvalue %struct.int32x2x2_t %.fca.0.0.insert, <2 x i32> %vuzp1.i, 0, 1
1063   ret %struct.int32x2x2_t %.fca.0.1.insert
1064 }
1065
1066 define %struct.uint8x8x2_t @test_vuzp_u8(<8 x i8> %a, <8 x i8> %b) {
1067 ; CHECK: test_vuzp_u8:
1068 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1069 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1070 entry:
1071   %vuzp.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1072   %vuzp1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1073   %.fca.0.0.insert = insertvalue %struct.uint8x8x2_t undef, <8 x i8> %vuzp.i, 0, 0
1074   %.fca.0.1.insert = insertvalue %struct.uint8x8x2_t %.fca.0.0.insert, <8 x i8> %vuzp1.i, 0, 1
1075   ret %struct.uint8x8x2_t %.fca.0.1.insert
1076 }
1077
1078 define %struct.uint16x4x2_t @test_vuzp_u16(<4 x i16> %a, <4 x i16> %b) {
1079 ; CHECK: test_vuzp_u16:
1080 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1081 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1082 entry:
1083   %vuzp.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1084   %vuzp1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1085   %.fca.0.0.insert = insertvalue %struct.uint16x4x2_t undef, <4 x i16> %vuzp.i, 0, 0
1086   %.fca.0.1.insert = insertvalue %struct.uint16x4x2_t %.fca.0.0.insert, <4 x i16> %vuzp1.i, 0, 1
1087   ret %struct.uint16x4x2_t %.fca.0.1.insert
1088 }
1089
1090 define %struct.uint32x2x2_t @test_vuzp_u32(<2 x i32> %a, <2 x i32> %b) {
1091 ; CHECK: test_vuzp_u32:
1092 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1093 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1094 entry:
1095   %vuzp.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1096   %vuzp1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1097   %.fca.0.0.insert = insertvalue %struct.uint32x2x2_t undef, <2 x i32> %vuzp.i, 0, 0
1098   %.fca.0.1.insert = insertvalue %struct.uint32x2x2_t %.fca.0.0.insert, <2 x i32> %vuzp1.i, 0, 1
1099   ret %struct.uint32x2x2_t %.fca.0.1.insert
1100 }
1101
1102 define %struct.float32x2x2_t @test_vuzp_f32(<2 x float> %a, <2 x float> %b) {
1103 ; CHECK: test_vuzp_f32:
1104 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1105 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1106 entry:
1107   %vuzp.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
1108   %vuzp1.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
1109   %.fca.0.0.insert = insertvalue %struct.float32x2x2_t undef, <2 x float> %vuzp.i, 0, 0
1110   %.fca.0.1.insert = insertvalue %struct.float32x2x2_t %.fca.0.0.insert, <2 x float> %vuzp1.i, 0, 1
1111   ret %struct.float32x2x2_t %.fca.0.1.insert
1112 }
1113
1114 define %struct.poly8x8x2_t @test_vuzp_p8(<8 x i8> %a, <8 x i8> %b) {
1115 ; CHECK: test_vuzp_p8:
1116 ; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1117 ; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1118 entry:
1119   %vuzp.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1120   %vuzp1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1121   %.fca.0.0.insert = insertvalue %struct.poly8x8x2_t undef, <8 x i8> %vuzp.i, 0, 0
1122   %.fca.0.1.insert = insertvalue %struct.poly8x8x2_t %.fca.0.0.insert, <8 x i8> %vuzp1.i, 0, 1
1123   ret %struct.poly8x8x2_t %.fca.0.1.insert
1124 }
1125
1126 define %struct.poly16x4x2_t @test_vuzp_p16(<4 x i16> %a, <4 x i16> %b) {
1127 ; CHECK: test_vuzp_p16:
1128 ; CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1129 ; CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1130 entry:
1131   %vuzp.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1132   %vuzp1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1133   %.fca.0.0.insert = insertvalue %struct.poly16x4x2_t undef, <4 x i16> %vuzp.i, 0, 0
1134   %.fca.0.1.insert = insertvalue %struct.poly16x4x2_t %.fca.0.0.insert, <4 x i16> %vuzp1.i, 0, 1
1135   ret %struct.poly16x4x2_t %.fca.0.1.insert
1136 }
1137
1138 define %struct.int8x16x2_t @test_vuzpq_s8(<16 x i8> %a, <16 x i8> %b) {
1139 ; CHECK: test_vuzpq_s8:
1140 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1141 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1142 entry:
1143   %vuzp.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
1144   %vuzp1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
1145   %.fca.0.0.insert = insertvalue %struct.int8x16x2_t undef, <16 x i8> %vuzp.i, 0, 0
1146   %.fca.0.1.insert = insertvalue %struct.int8x16x2_t %.fca.0.0.insert, <16 x i8> %vuzp1.i, 0, 1
1147   ret %struct.int8x16x2_t %.fca.0.1.insert
1148 }
1149
1150 define %struct.int16x8x2_t @test_vuzpq_s16(<8 x i16> %a, <8 x i16> %b) {
1151 ; CHECK: test_vuzpq_s16:
1152 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1153 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1154 entry:
1155   %vuzp.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1156   %vuzp1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1157   %.fca.0.0.insert = insertvalue %struct.int16x8x2_t undef, <8 x i16> %vuzp.i, 0, 0
1158   %.fca.0.1.insert = insertvalue %struct.int16x8x2_t %.fca.0.0.insert, <8 x i16> %vuzp1.i, 0, 1
1159   ret %struct.int16x8x2_t %.fca.0.1.insert
1160 }
1161
1162 define %struct.int32x4x2_t @test_vuzpq_s32(<4 x i32> %a, <4 x i32> %b) {
1163 ; CHECK: test_vuzpq_s32:
1164 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1165 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1166 entry:
1167   %vuzp.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1168   %vuzp1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1169   %.fca.0.0.insert = insertvalue %struct.int32x4x2_t undef, <4 x i32> %vuzp.i, 0, 0
1170   %.fca.0.1.insert = insertvalue %struct.int32x4x2_t %.fca.0.0.insert, <4 x i32> %vuzp1.i, 0, 1
1171   ret %struct.int32x4x2_t %.fca.0.1.insert
1172 }
1173
1174 define %struct.uint8x16x2_t @test_vuzpq_u8(<16 x i8> %a, <16 x i8> %b) {
1175 ; CHECK: test_vuzpq_u8:
1176 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1177 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1178 entry:
1179   %vuzp.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
1180   %vuzp1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
1181   %.fca.0.0.insert = insertvalue %struct.uint8x16x2_t undef, <16 x i8> %vuzp.i, 0, 0
1182   %.fca.0.1.insert = insertvalue %struct.uint8x16x2_t %.fca.0.0.insert, <16 x i8> %vuzp1.i, 0, 1
1183   ret %struct.uint8x16x2_t %.fca.0.1.insert
1184 }
1185
1186 define %struct.uint16x8x2_t @test_vuzpq_u16(<8 x i16> %a, <8 x i16> %b) {
1187 ; CHECK: test_vuzpq_u16:
1188 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1189 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1190 entry:
1191   %vuzp.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1192   %vuzp1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1193   %.fca.0.0.insert = insertvalue %struct.uint16x8x2_t undef, <8 x i16> %vuzp.i, 0, 0
1194   %.fca.0.1.insert = insertvalue %struct.uint16x8x2_t %.fca.0.0.insert, <8 x i16> %vuzp1.i, 0, 1
1195   ret %struct.uint16x8x2_t %.fca.0.1.insert
1196 }
1197
1198 define %struct.uint32x4x2_t @test_vuzpq_u32(<4 x i32> %a, <4 x i32> %b) {
1199 ; CHECK: test_vuzpq_u32:
1200 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1201 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1202 entry:
1203   %vuzp.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1204   %vuzp1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1205   %.fca.0.0.insert = insertvalue %struct.uint32x4x2_t undef, <4 x i32> %vuzp.i, 0, 0
1206   %.fca.0.1.insert = insertvalue %struct.uint32x4x2_t %.fca.0.0.insert, <4 x i32> %vuzp1.i, 0, 1
1207   ret %struct.uint32x4x2_t %.fca.0.1.insert
1208 }
1209
1210 define %struct.float32x4x2_t @test_vuzpq_f32(<4 x float> %a, <4 x float> %b) {
1211 ; CHECK: test_vuzpq_f32:
1212 ; CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1213 ; CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1214 entry:
1215   %vuzp.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1216   %vuzp1.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1217   %.fca.0.0.insert = insertvalue %struct.float32x4x2_t undef, <4 x float> %vuzp.i, 0, 0
1218   %.fca.0.1.insert = insertvalue %struct.float32x4x2_t %.fca.0.0.insert, <4 x float> %vuzp1.i, 0, 1
1219   ret %struct.float32x4x2_t %.fca.0.1.insert
1220 }
1221
1222 define %struct.poly8x16x2_t @test_vuzpq_p8(<16 x i8> %a, <16 x i8> %b) {
1223 ; CHECK: test_vuzpq_p8:
1224 ; CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1225 ; CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1226 entry:
1227   %vuzp.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
1228   %vuzp1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
1229   %.fca.0.0.insert = insertvalue %struct.poly8x16x2_t undef, <16 x i8> %vuzp.i, 0, 0
1230   %.fca.0.1.insert = insertvalue %struct.poly8x16x2_t %.fca.0.0.insert, <16 x i8> %vuzp1.i, 0, 1
1231   ret %struct.poly8x16x2_t %.fca.0.1.insert
1232 }
1233
1234 define %struct.poly16x8x2_t @test_vuzpq_p16(<8 x i16> %a, <8 x i16> %b) {
1235 ; CHECK: test_vuzpq_p16:
1236 ; CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1237 ; CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1238 entry:
1239   %vuzp.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1240   %vuzp1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1241   %.fca.0.0.insert = insertvalue %struct.poly16x8x2_t undef, <8 x i16> %vuzp.i, 0, 0
1242   %.fca.0.1.insert = insertvalue %struct.poly16x8x2_t %.fca.0.0.insert, <8 x i16> %vuzp1.i, 0, 1
1243   ret %struct.poly16x8x2_t %.fca.0.1.insert
1244 }
1245
1246 define %struct.int8x8x2_t @test_vzip_s8(<8 x i8> %a, <8 x i8> %b) {
1247 ; CHECK: test_vzip_s8:
1248 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1249 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1250 entry:
1251   %vzip.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1252   %vzip1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1253   %.fca.0.0.insert = insertvalue %struct.int8x8x2_t undef, <8 x i8> %vzip.i, 0, 0
1254   %.fca.0.1.insert = insertvalue %struct.int8x8x2_t %.fca.0.0.insert, <8 x i8> %vzip1.i, 0, 1
1255   ret %struct.int8x8x2_t %.fca.0.1.insert
1256 }
1257
1258 define %struct.int16x4x2_t @test_vzip_s16(<4 x i16> %a, <4 x i16> %b) {
1259 ; CHECK: test_vzip_s16:
1260 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1261 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1262 entry:
1263   %vzip.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1264   %vzip1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1265   %.fca.0.0.insert = insertvalue %struct.int16x4x2_t undef, <4 x i16> %vzip.i, 0, 0
1266   %.fca.0.1.insert = insertvalue %struct.int16x4x2_t %.fca.0.0.insert, <4 x i16> %vzip1.i, 0, 1
1267   ret %struct.int16x4x2_t %.fca.0.1.insert
1268 }
1269
1270 define %struct.int32x2x2_t @test_vzip_s32(<2 x i32> %a, <2 x i32> %b) {
1271 ; CHECK: test_vzip_s32:
1272 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1273 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1274 entry:
1275   %vzip.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1276   %vzip1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1277   %.fca.0.0.insert = insertvalue %struct.int32x2x2_t undef, <2 x i32> %vzip.i, 0, 0
1278   %.fca.0.1.insert = insertvalue %struct.int32x2x2_t %.fca.0.0.insert, <2 x i32> %vzip1.i, 0, 1
1279   ret %struct.int32x2x2_t %.fca.0.1.insert
1280 }
1281
1282 define %struct.uint8x8x2_t @test_vzip_u8(<8 x i8> %a, <8 x i8> %b) {
1283 ; CHECK: test_vzip_u8:
1284 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1285 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1286 entry:
1287   %vzip.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1288   %vzip1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1289   %.fca.0.0.insert = insertvalue %struct.uint8x8x2_t undef, <8 x i8> %vzip.i, 0, 0
1290   %.fca.0.1.insert = insertvalue %struct.uint8x8x2_t %.fca.0.0.insert, <8 x i8> %vzip1.i, 0, 1
1291   ret %struct.uint8x8x2_t %.fca.0.1.insert
1292 }
1293
1294 define %struct.uint16x4x2_t @test_vzip_u16(<4 x i16> %a, <4 x i16> %b) {
1295 ; CHECK: test_vzip_u16:
1296 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1297 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1298 entry:
1299   %vzip.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1300   %vzip1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1301   %.fca.0.0.insert = insertvalue %struct.uint16x4x2_t undef, <4 x i16> %vzip.i, 0, 0
1302   %.fca.0.1.insert = insertvalue %struct.uint16x4x2_t %.fca.0.0.insert, <4 x i16> %vzip1.i, 0, 1
1303   ret %struct.uint16x4x2_t %.fca.0.1.insert
1304 }
1305
1306 define %struct.uint32x2x2_t @test_vzip_u32(<2 x i32> %a, <2 x i32> %b) {
1307 ; CHECK: test_vzip_u32:
1308 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1309 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1310 entry:
1311   %vzip.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1312   %vzip1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1313   %.fca.0.0.insert = insertvalue %struct.uint32x2x2_t undef, <2 x i32> %vzip.i, 0, 0
1314   %.fca.0.1.insert = insertvalue %struct.uint32x2x2_t %.fca.0.0.insert, <2 x i32> %vzip1.i, 0, 1
1315   ret %struct.uint32x2x2_t %.fca.0.1.insert
1316 }
1317
1318 define %struct.float32x2x2_t @test_vzip_f32(<2 x float> %a, <2 x float> %b) {
1319 ; CHECK: test_vzip_f32:
1320 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1321 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1322 entry:
1323   %vzip.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
1324   %vzip1.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
1325   %.fca.0.0.insert = insertvalue %struct.float32x2x2_t undef, <2 x float> %vzip.i, 0, 0
1326   %.fca.0.1.insert = insertvalue %struct.float32x2x2_t %.fca.0.0.insert, <2 x float> %vzip1.i, 0, 1
1327   ret %struct.float32x2x2_t %.fca.0.1.insert
1328 }
1329
1330 define %struct.poly8x8x2_t @test_vzip_p8(<8 x i8> %a, <8 x i8> %b) {
1331 ; CHECK: test_vzip_p8:
1332 ; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1333 ; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1334 entry:
1335   %vzip.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1336   %vzip1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1337   %.fca.0.0.insert = insertvalue %struct.poly8x8x2_t undef, <8 x i8> %vzip.i, 0, 0
1338   %.fca.0.1.insert = insertvalue %struct.poly8x8x2_t %.fca.0.0.insert, <8 x i8> %vzip1.i, 0, 1
1339   ret %struct.poly8x8x2_t %.fca.0.1.insert
1340 }
1341
1342 define %struct.poly16x4x2_t @test_vzip_p16(<4 x i16> %a, <4 x i16> %b) {
1343 ; CHECK: test_vzip_p16:
1344 ; CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1345 ; CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1346 entry:
1347   %vzip.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1348   %vzip1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1349   %.fca.0.0.insert = insertvalue %struct.poly16x4x2_t undef, <4 x i16> %vzip.i, 0, 0
1350   %.fca.0.1.insert = insertvalue %struct.poly16x4x2_t %.fca.0.0.insert, <4 x i16> %vzip1.i, 0, 1
1351   ret %struct.poly16x4x2_t %.fca.0.1.insert
1352 }
1353
1354 define %struct.int8x16x2_t @test_vzipq_s8(<16 x i8> %a, <16 x i8> %b) {
1355 ; CHECK: test_vzipq_s8:
1356 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1357 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1358 entry:
1359   %vzip.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
1360   %vzip1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
1361   %.fca.0.0.insert = insertvalue %struct.int8x16x2_t undef, <16 x i8> %vzip.i, 0, 0
1362   %.fca.0.1.insert = insertvalue %struct.int8x16x2_t %.fca.0.0.insert, <16 x i8> %vzip1.i, 0, 1
1363   ret %struct.int8x16x2_t %.fca.0.1.insert
1364 }
1365
1366 define %struct.int16x8x2_t @test_vzipq_s16(<8 x i16> %a, <8 x i16> %b) {
1367 ; CHECK: test_vzipq_s16:
1368 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1369 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1370 entry:
1371   %vzip.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1372   %vzip1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1373   %.fca.0.0.insert = insertvalue %struct.int16x8x2_t undef, <8 x i16> %vzip.i, 0, 0
1374   %.fca.0.1.insert = insertvalue %struct.int16x8x2_t %.fca.0.0.insert, <8 x i16> %vzip1.i, 0, 1
1375   ret %struct.int16x8x2_t %.fca.0.1.insert
1376 }
1377
1378 define %struct.int32x4x2_t @test_vzipq_s32(<4 x i32> %a, <4 x i32> %b) {
1379 ; CHECK: test_vzipq_s32:
1380 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1381 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1382 entry:
1383   %vzip.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1384   %vzip1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1385   %.fca.0.0.insert = insertvalue %struct.int32x4x2_t undef, <4 x i32> %vzip.i, 0, 0
1386   %.fca.0.1.insert = insertvalue %struct.int32x4x2_t %.fca.0.0.insert, <4 x i32> %vzip1.i, 0, 1
1387   ret %struct.int32x4x2_t %.fca.0.1.insert
1388 }
1389
1390 define %struct.uint8x16x2_t @test_vzipq_u8(<16 x i8> %a, <16 x i8> %b) {
1391 ; CHECK: test_vzipq_u8:
1392 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1393 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1394 entry:
1395   %vzip.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
1396   %vzip1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
1397   %.fca.0.0.insert = insertvalue %struct.uint8x16x2_t undef, <16 x i8> %vzip.i, 0, 0
1398   %.fca.0.1.insert = insertvalue %struct.uint8x16x2_t %.fca.0.0.insert, <16 x i8> %vzip1.i, 0, 1
1399   ret %struct.uint8x16x2_t %.fca.0.1.insert
1400 }
1401
1402 define %struct.uint16x8x2_t @test_vzipq_u16(<8 x i16> %a, <8 x i16> %b) {
1403 ; CHECK: test_vzipq_u16:
1404 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1405 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1406 entry:
1407   %vzip.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1408   %vzip1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1409   %.fca.0.0.insert = insertvalue %struct.uint16x8x2_t undef, <8 x i16> %vzip.i, 0, 0
1410   %.fca.0.1.insert = insertvalue %struct.uint16x8x2_t %.fca.0.0.insert, <8 x i16> %vzip1.i, 0, 1
1411   ret %struct.uint16x8x2_t %.fca.0.1.insert
1412 }
1413
1414 define %struct.uint32x4x2_t @test_vzipq_u32(<4 x i32> %a, <4 x i32> %b) {
1415 ; CHECK: test_vzipq_u32:
1416 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1417 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1418 entry:
1419   %vzip.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1420   %vzip1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1421   %.fca.0.0.insert = insertvalue %struct.uint32x4x2_t undef, <4 x i32> %vzip.i, 0, 0
1422   %.fca.0.1.insert = insertvalue %struct.uint32x4x2_t %.fca.0.0.insert, <4 x i32> %vzip1.i, 0, 1
1423   ret %struct.uint32x4x2_t %.fca.0.1.insert
1424 }
1425
1426 define %struct.float32x4x2_t @test_vzipq_f32(<4 x float> %a, <4 x float> %b) {
1427 ; CHECK: test_vzipq_f32:
1428 ; CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1429 ; CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1430 entry:
1431   %vzip.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1432   %vzip1.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1433   %.fca.0.0.insert = insertvalue %struct.float32x4x2_t undef, <4 x float> %vzip.i, 0, 0
1434   %.fca.0.1.insert = insertvalue %struct.float32x4x2_t %.fca.0.0.insert, <4 x float> %vzip1.i, 0, 1
1435   ret %struct.float32x4x2_t %.fca.0.1.insert
1436 }
1437
1438 define %struct.poly8x16x2_t @test_vzipq_p8(<16 x i8> %a, <16 x i8> %b) {
1439 ; CHECK: test_vzipq_p8:
1440 ; CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1441 ; CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1442 entry:
1443   %vzip.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
1444   %vzip1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
1445   %.fca.0.0.insert = insertvalue %struct.poly8x16x2_t undef, <16 x i8> %vzip.i, 0, 0
1446   %.fca.0.1.insert = insertvalue %struct.poly8x16x2_t %.fca.0.0.insert, <16 x i8> %vzip1.i, 0, 1
1447   ret %struct.poly8x16x2_t %.fca.0.1.insert
1448 }
1449
1450 define %struct.poly16x8x2_t @test_vzipq_p16(<8 x i16> %a, <8 x i16> %b) {
1451 ; CHECK: test_vzipq_p16:
1452 ; CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1453 ; CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1454 entry:
1455   %vzip.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1456   %vzip1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
1457   %.fca.0.0.insert = insertvalue %struct.poly16x8x2_t undef, <8 x i16> %vzip.i, 0, 0
1458   %.fca.0.1.insert = insertvalue %struct.poly16x8x2_t %.fca.0.0.insert, <8 x i16> %vzip1.i, 0, 1
1459   ret %struct.poly16x8x2_t %.fca.0.1.insert
1460 }
1461
1462 define %struct.int8x8x2_t @test_vtrn_s8(<8 x i8> %a, <8 x i8> %b) {
1463 ; CHECK: test_vtrn_s8:
1464 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1465 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1466 entry:
1467   %vtrn.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1468   %vtrn1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1469   %.fca.0.0.insert = insertvalue %struct.int8x8x2_t undef, <8 x i8> %vtrn.i, 0, 0
1470   %.fca.0.1.insert = insertvalue %struct.int8x8x2_t %.fca.0.0.insert, <8 x i8> %vtrn1.i, 0, 1
1471   ret %struct.int8x8x2_t %.fca.0.1.insert
1472 }
1473
1474 define %struct.int16x4x2_t @test_vtrn_s16(<4 x i16> %a, <4 x i16> %b) {
1475 ; CHECK: test_vtrn_s16:
1476 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1477 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1478 entry:
1479   %vtrn.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1480   %vtrn1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1481   %.fca.0.0.insert = insertvalue %struct.int16x4x2_t undef, <4 x i16> %vtrn.i, 0, 0
1482   %.fca.0.1.insert = insertvalue %struct.int16x4x2_t %.fca.0.0.insert, <4 x i16> %vtrn1.i, 0, 1
1483   ret %struct.int16x4x2_t %.fca.0.1.insert
1484 }
1485
1486 define %struct.int32x2x2_t @test_vtrn_s32(<2 x i32> %a, <2 x i32> %b) {
1487 ; CHECK: test_vtrn_s32:
1488 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1489 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1490 entry:
1491   %vtrn.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1492   %vtrn1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1493   %.fca.0.0.insert = insertvalue %struct.int32x2x2_t undef, <2 x i32> %vtrn.i, 0, 0
1494   %.fca.0.1.insert = insertvalue %struct.int32x2x2_t %.fca.0.0.insert, <2 x i32> %vtrn1.i, 0, 1
1495   ret %struct.int32x2x2_t %.fca.0.1.insert
1496 }
1497
1498 define %struct.uint8x8x2_t @test_vtrn_u8(<8 x i8> %a, <8 x i8> %b) {
1499 ; CHECK: test_vtrn_u8:
1500 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1501 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1502 entry:
1503   %vtrn.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1504   %vtrn1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1505   %.fca.0.0.insert = insertvalue %struct.uint8x8x2_t undef, <8 x i8> %vtrn.i, 0, 0
1506   %.fca.0.1.insert = insertvalue %struct.uint8x8x2_t %.fca.0.0.insert, <8 x i8> %vtrn1.i, 0, 1
1507   ret %struct.uint8x8x2_t %.fca.0.1.insert
1508 }
1509
1510 define %struct.uint16x4x2_t @test_vtrn_u16(<4 x i16> %a, <4 x i16> %b) {
1511 ; CHECK: test_vtrn_u16:
1512 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1513 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1514 entry:
1515   %vtrn.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1516   %vtrn1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1517   %.fca.0.0.insert = insertvalue %struct.uint16x4x2_t undef, <4 x i16> %vtrn.i, 0, 0
1518   %.fca.0.1.insert = insertvalue %struct.uint16x4x2_t %.fca.0.0.insert, <4 x i16> %vtrn1.i, 0, 1
1519   ret %struct.uint16x4x2_t %.fca.0.1.insert
1520 }
1521
1522 define %struct.uint32x2x2_t @test_vtrn_u32(<2 x i32> %a, <2 x i32> %b) {
1523 ; CHECK: test_vtrn_u32:
1524 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1525 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1526 entry:
1527   %vtrn.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 0, i32 2>
1528   %vtrn1.i = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 3>
1529   %.fca.0.0.insert = insertvalue %struct.uint32x2x2_t undef, <2 x i32> %vtrn.i, 0, 0
1530   %.fca.0.1.insert = insertvalue %struct.uint32x2x2_t %.fca.0.0.insert, <2 x i32> %vtrn1.i, 0, 1
1531   ret %struct.uint32x2x2_t %.fca.0.1.insert
1532 }
1533
1534 define %struct.float32x2x2_t @test_vtrn_f32(<2 x float> %a, <2 x float> %b) {
1535 ; CHECK: test_vtrn_f32:
1536 ; CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
1537 ; CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
1538 entry:
1539   %vtrn.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 0, i32 2>
1540   %vtrn1.i = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 3>
1541   %.fca.0.0.insert = insertvalue %struct.float32x2x2_t undef, <2 x float> %vtrn.i, 0, 0
1542   %.fca.0.1.insert = insertvalue %struct.float32x2x2_t %.fca.0.0.insert, <2 x float> %vtrn1.i, 0, 1
1543   ret %struct.float32x2x2_t %.fca.0.1.insert
1544 }
1545
1546 define %struct.poly8x8x2_t @test_vtrn_p8(<8 x i8> %a, <8 x i8> %b) {
1547 ; CHECK: test_vtrn_p8:
1548 ; CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1549 ; CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
1550 entry:
1551   %vtrn.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1552   %vtrn1.i = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1553   %.fca.0.0.insert = insertvalue %struct.poly8x8x2_t undef, <8 x i8> %vtrn.i, 0, 0
1554   %.fca.0.1.insert = insertvalue %struct.poly8x8x2_t %.fca.0.0.insert, <8 x i8> %vtrn1.i, 0, 1
1555   ret %struct.poly8x8x2_t %.fca.0.1.insert
1556 }
1557
1558 define %struct.poly16x4x2_t @test_vtrn_p16(<4 x i16> %a, <4 x i16> %b) {
1559 ; CHECK: test_vtrn_p16:
1560 ; CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1561 ; CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
1562 entry:
1563   %vtrn.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1564   %vtrn1.i = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1565   %.fca.0.0.insert = insertvalue %struct.poly16x4x2_t undef, <4 x i16> %vtrn.i, 0, 0
1566   %.fca.0.1.insert = insertvalue %struct.poly16x4x2_t %.fca.0.0.insert, <4 x i16> %vtrn1.i, 0, 1
1567   ret %struct.poly16x4x2_t %.fca.0.1.insert
1568 }
1569
1570 define %struct.int8x16x2_t @test_vtrnq_s8(<16 x i8> %a, <16 x i8> %b) {
1571 ; CHECK: test_vtrnq_s8:
1572 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1573 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1574 entry:
1575   %vtrn.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
1576   %vtrn1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
1577   %.fca.0.0.insert = insertvalue %struct.int8x16x2_t undef, <16 x i8> %vtrn.i, 0, 0
1578   %.fca.0.1.insert = insertvalue %struct.int8x16x2_t %.fca.0.0.insert, <16 x i8> %vtrn1.i, 0, 1
1579   ret %struct.int8x16x2_t %.fca.0.1.insert
1580 }
1581
1582 define %struct.int16x8x2_t @test_vtrnq_s16(<8 x i16> %a, <8 x i16> %b) {
1583 ; CHECK: test_vtrnq_s16:
1584 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1585 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1586 entry:
1587   %vtrn.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1588   %vtrn1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1589   %.fca.0.0.insert = insertvalue %struct.int16x8x2_t undef, <8 x i16> %vtrn.i, 0, 0
1590   %.fca.0.1.insert = insertvalue %struct.int16x8x2_t %.fca.0.0.insert, <8 x i16> %vtrn1.i, 0, 1
1591   ret %struct.int16x8x2_t %.fca.0.1.insert
1592 }
1593
1594 define %struct.int32x4x2_t @test_vtrnq_s32(<4 x i32> %a, <4 x i32> %b) {
1595 ; CHECK: test_vtrnq_s32:
1596 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1597 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1598 entry:
1599   %vtrn.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1600   %vtrn1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1601   %.fca.0.0.insert = insertvalue %struct.int32x4x2_t undef, <4 x i32> %vtrn.i, 0, 0
1602   %.fca.0.1.insert = insertvalue %struct.int32x4x2_t %.fca.0.0.insert, <4 x i32> %vtrn1.i, 0, 1
1603   ret %struct.int32x4x2_t %.fca.0.1.insert
1604 }
1605
1606 define %struct.uint8x16x2_t @test_vtrnq_u8(<16 x i8> %a, <16 x i8> %b) {
1607 ; CHECK: test_vtrnq_u8:
1608 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1609 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1610 entry:
1611   %vtrn.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
1612   %vtrn1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
1613   %.fca.0.0.insert = insertvalue %struct.uint8x16x2_t undef, <16 x i8> %vtrn.i, 0, 0
1614   %.fca.0.1.insert = insertvalue %struct.uint8x16x2_t %.fca.0.0.insert, <16 x i8> %vtrn1.i, 0, 1
1615   ret %struct.uint8x16x2_t %.fca.0.1.insert
1616 }
1617
1618 define %struct.uint16x8x2_t @test_vtrnq_u16(<8 x i16> %a, <8 x i16> %b) {
1619 ; CHECK: test_vtrnq_u16:
1620 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1621 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1622 entry:
1623   %vtrn.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1624   %vtrn1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1625   %.fca.0.0.insert = insertvalue %struct.uint16x8x2_t undef, <8 x i16> %vtrn.i, 0, 0
1626   %.fca.0.1.insert = insertvalue %struct.uint16x8x2_t %.fca.0.0.insert, <8 x i16> %vtrn1.i, 0, 1
1627   ret %struct.uint16x8x2_t %.fca.0.1.insert
1628 }
1629
1630 define %struct.uint32x4x2_t @test_vtrnq_u32(<4 x i32> %a, <4 x i32> %b) {
1631 ; CHECK: test_vtrnq_u32:
1632 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1633 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1634 entry:
1635   %vtrn.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1636   %vtrn1.i = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1637   %.fca.0.0.insert = insertvalue %struct.uint32x4x2_t undef, <4 x i32> %vtrn.i, 0, 0
1638   %.fca.0.1.insert = insertvalue %struct.uint32x4x2_t %.fca.0.0.insert, <4 x i32> %vtrn1.i, 0, 1
1639   ret %struct.uint32x4x2_t %.fca.0.1.insert
1640 }
1641
1642 define %struct.float32x4x2_t @test_vtrnq_f32(<4 x float> %a, <4 x float> %b) {
1643 ; CHECK: test_vtrnq_f32:
1644 ; CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1645 ; CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
1646 entry:
1647   %vtrn.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
1648   %vtrn1.i = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
1649   %.fca.0.0.insert = insertvalue %struct.float32x4x2_t undef, <4 x float> %vtrn.i, 0, 0
1650   %.fca.0.1.insert = insertvalue %struct.float32x4x2_t %.fca.0.0.insert, <4 x float> %vtrn1.i, 0, 1
1651   ret %struct.float32x4x2_t %.fca.0.1.insert
1652 }
1653
1654 define %struct.poly8x16x2_t @test_vtrnq_p8(<16 x i8> %a, <16 x i8> %b) {
1655 ; CHECK: test_vtrnq_p8:
1656 ; CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1657 ; CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
1658 entry:
1659   %vtrn.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
1660   %vtrn1.i = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
1661   %.fca.0.0.insert = insertvalue %struct.poly8x16x2_t undef, <16 x i8> %vtrn.i, 0, 0
1662   %.fca.0.1.insert = insertvalue %struct.poly8x16x2_t %.fca.0.0.insert, <16 x i8> %vtrn1.i, 0, 1
1663   ret %struct.poly8x16x2_t %.fca.0.1.insert
1664 }
1665
1666 define %struct.poly16x8x2_t @test_vtrnq_p16(<8 x i16> %a, <8 x i16> %b) {
1667 ; CHECK: test_vtrnq_p16:
1668 ; CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1669 ; CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
1670 entry:
1671   %vtrn.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1672   %vtrn1.i = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1673   %.fca.0.0.insert = insertvalue %struct.poly16x8x2_t undef, <8 x i16> %vtrn.i, 0, 0
1674   %.fca.0.1.insert = insertvalue %struct.poly16x8x2_t %.fca.0.0.insert, <8 x i16> %vtrn1.i, 0, 1
1675   ret %struct.poly16x8x2_t %.fca.0.1.insert
1676 }