1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=aarch64 -verify-machineinstrs %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3 ; RUN: llc -mtriple=aarch64 -global-isel -global-isel-abort=2 -verify-machineinstrs %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 ; CHECK-GI: warning: Instruction selection used fallback path for zext_v16i10_v16i16
7 define i16 @zext_i8_to_i16(i8 %a) {
8 ; CHECK-LABEL: zext_i8_to_i16:
9 ; CHECK: // %bb.0: // %entry
10 ; CHECK-NEXT: and w0, w0, #0xff
13 %c = zext i8 %a to i16
17 define i32 @zext_i8_to_i32(i8 %a) {
18 ; CHECK-LABEL: zext_i8_to_i32:
19 ; CHECK: // %bb.0: // %entry
20 ; CHECK-NEXT: and w0, w0, #0xff
23 %c = zext i8 %a to i32
27 define i64 @zext_i8_to_i64(i8 %a) {
28 ; CHECK-LABEL: zext_i8_to_i64:
29 ; CHECK: // %bb.0: // %entry
30 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
31 ; CHECK-NEXT: and x0, x0, #0xff
34 %c = zext i8 %a to i64
38 define i10 @zext_i8_to_i10(i8 %a) {
39 ; CHECK-LABEL: zext_i8_to_i10:
40 ; CHECK: // %bb.0: // %entry
41 ; CHECK-NEXT: and w0, w0, #0xff
44 %c = zext i8 %a to i10
48 define i32 @zext_i16_to_i32(i16 %a) {
49 ; CHECK-LABEL: zext_i16_to_i32:
50 ; CHECK: // %bb.0: // %entry
51 ; CHECK-NEXT: and w0, w0, #0xffff
54 %c = zext i16 %a to i32
58 define i64 @zext_i16_to_i64(i16 %a) {
59 ; CHECK-LABEL: zext_i16_to_i64:
60 ; CHECK: // %bb.0: // %entry
61 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
62 ; CHECK-NEXT: and x0, x0, #0xffff
65 %c = zext i16 %a to i64
69 define i64 @zext_i32_to_i64(i32 %a) {
70 ; CHECK-LABEL: zext_i32_to_i64:
71 ; CHECK: // %bb.0: // %entry
72 ; CHECK-NEXT: mov w0, w0
75 %c = zext i32 %a to i64
79 define i16 @zext_i10_to_i16(i10 %a) {
80 ; CHECK-LABEL: zext_i10_to_i16:
81 ; CHECK: // %bb.0: // %entry
82 ; CHECK-NEXT: and w0, w0, #0x3ff
85 %c = zext i10 %a to i16
89 define i32 @zext_i10_to_i32(i10 %a) {
90 ; CHECK-LABEL: zext_i10_to_i32:
91 ; CHECK: // %bb.0: // %entry
92 ; CHECK-NEXT: and w0, w0, #0x3ff
95 %c = zext i10 %a to i32
99 define i64 @zext_i10_to_i64(i10 %a) {
100 ; CHECK-LABEL: zext_i10_to_i64:
101 ; CHECK: // %bb.0: // %entry
102 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
103 ; CHECK-NEXT: and x0, x0, #0x3ff
106 %c = zext i10 %a to i64
110 define <2 x i16> @zext_v2i8_v2i16(<2 x i8> %a) {
111 ; CHECK-SD-LABEL: zext_v2i8_v2i16:
112 ; CHECK-SD: // %bb.0: // %entry
113 ; CHECK-SD-NEXT: movi d1, #0x0000ff000000ff
114 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
117 ; CHECK-GI-LABEL: zext_v2i8_v2i16:
118 ; CHECK-GI: // %bb.0: // %entry
119 ; CHECK-GI-NEXT: adrp x8, .LCPI10_0
120 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI10_0]
121 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
124 %c = zext <2 x i8> %a to <2 x i16>
128 define <2 x i32> @zext_v2i8_v2i32(<2 x i8> %a) {
129 ; CHECK-SD-LABEL: zext_v2i8_v2i32:
130 ; CHECK-SD: // %bb.0: // %entry
131 ; CHECK-SD-NEXT: movi d1, #0x0000ff000000ff
132 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
135 ; CHECK-GI-LABEL: zext_v2i8_v2i32:
136 ; CHECK-GI: // %bb.0: // %entry
137 ; CHECK-GI-NEXT: adrp x8, .LCPI11_0
138 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI11_0]
139 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
142 %c = zext <2 x i8> %a to <2 x i32>
146 define <2 x i64> @zext_v2i8_v2i64(<2 x i8> %a) {
147 ; CHECK-SD-LABEL: zext_v2i8_v2i64:
148 ; CHECK-SD: // %bb.0: // %entry
149 ; CHECK-SD-NEXT: movi d1, #0x0000ff000000ff
150 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
151 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
154 ; CHECK-GI-LABEL: zext_v2i8_v2i64:
155 ; CHECK-GI: // %bb.0: // %entry
156 ; CHECK-GI-NEXT: adrp x8, .LCPI12_0
157 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
158 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI12_0]
159 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
162 %c = zext <2 x i8> %a to <2 x i64>
166 define <2 x i32> @zext_v2i16_v2i32(<2 x i16> %a) {
167 ; CHECK-SD-LABEL: zext_v2i16_v2i32:
168 ; CHECK-SD: // %bb.0: // %entry
169 ; CHECK-SD-NEXT: movi d1, #0x00ffff0000ffff
170 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
173 ; CHECK-GI-LABEL: zext_v2i16_v2i32:
174 ; CHECK-GI: // %bb.0: // %entry
175 ; CHECK-GI-NEXT: adrp x8, .LCPI13_0
176 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI13_0]
177 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
180 %c = zext <2 x i16> %a to <2 x i32>
184 define <2 x i64> @zext_v2i16_v2i64(<2 x i16> %a) {
185 ; CHECK-SD-LABEL: zext_v2i16_v2i64:
186 ; CHECK-SD: // %bb.0: // %entry
187 ; CHECK-SD-NEXT: movi d1, #0x00ffff0000ffff
188 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
189 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
192 ; CHECK-GI-LABEL: zext_v2i16_v2i64:
193 ; CHECK-GI: // %bb.0: // %entry
194 ; CHECK-GI-NEXT: adrp x8, .LCPI14_0
195 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
196 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI14_0]
197 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
200 %c = zext <2 x i16> %a to <2 x i64>
204 define <2 x i64> @zext_v2i32_v2i64(<2 x i32> %a) {
205 ; CHECK-LABEL: zext_v2i32_v2i64:
206 ; CHECK: // %bb.0: // %entry
207 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
210 %c = zext <2 x i32> %a to <2 x i64>
214 define <2 x i16> @zext_v2i10_v2i16(<2 x i10> %a) {
215 ; CHECK-SD-LABEL: zext_v2i10_v2i16:
216 ; CHECK-SD: // %bb.0: // %entry
217 ; CHECK-SD-NEXT: movi v1.2s, #3, msl #8
218 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
221 ; CHECK-GI-LABEL: zext_v2i10_v2i16:
222 ; CHECK-GI: // %bb.0: // %entry
223 ; CHECK-GI-NEXT: adrp x8, .LCPI16_0
224 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI16_0]
225 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
228 %c = zext <2 x i10> %a to <2 x i16>
232 define <2 x i32> @zext_v2i10_v2i32(<2 x i10> %a) {
233 ; CHECK-SD-LABEL: zext_v2i10_v2i32:
234 ; CHECK-SD: // %bb.0: // %entry
235 ; CHECK-SD-NEXT: movi v1.2s, #3, msl #8
236 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
239 ; CHECK-GI-LABEL: zext_v2i10_v2i32:
240 ; CHECK-GI: // %bb.0: // %entry
241 ; CHECK-GI-NEXT: adrp x8, .LCPI17_0
242 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI17_0]
243 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
246 %c = zext <2 x i10> %a to <2 x i32>
250 define <2 x i64> @zext_v2i10_v2i64(<2 x i10> %a) {
251 ; CHECK-SD-LABEL: zext_v2i10_v2i64:
252 ; CHECK-SD: // %bb.0: // %entry
253 ; CHECK-SD-NEXT: movi v1.2s, #3, msl #8
254 ; CHECK-SD-NEXT: and v0.8b, v0.8b, v1.8b
255 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
258 ; CHECK-GI-LABEL: zext_v2i10_v2i64:
259 ; CHECK-GI: // %bb.0: // %entry
260 ; CHECK-GI-NEXT: adrp x8, .LCPI18_0
261 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
262 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI18_0]
263 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
266 %c = zext <2 x i10> %a to <2 x i64>
270 define <3 x i16> @zext_v3i8_v3i16(<3 x i8> %a) {
271 ; CHECK-SD-LABEL: zext_v3i8_v3i16:
272 ; CHECK-SD: // %bb.0: // %entry
273 ; CHECK-SD-NEXT: fmov s0, w0
274 ; CHECK-SD-NEXT: mov v0.h[1], w1
275 ; CHECK-SD-NEXT: mov v0.h[2], w2
276 ; CHECK-SD-NEXT: bic v0.4h, #255, lsl #8
277 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
280 ; CHECK-GI-LABEL: zext_v3i8_v3i16:
281 ; CHECK-GI: // %bb.0: // %entry
282 ; CHECK-GI-NEXT: mov w8, #255 // =0xff
283 ; CHECK-GI-NEXT: fmov s1, w0
284 ; CHECK-GI-NEXT: fmov s2, w1
285 ; CHECK-GI-NEXT: fmov s0, w8
286 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
287 ; CHECK-GI-NEXT: fmov s2, w2
288 ; CHECK-GI-NEXT: mov v3.16b, v0.16b
289 ; CHECK-GI-NEXT: mov v3.h[1], v0.h[0]
290 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
291 ; CHECK-GI-NEXT: mov v3.h[2], v0.h[0]
292 ; CHECK-GI-NEXT: mov v1.h[3], v0.h[0]
293 ; CHECK-GI-NEXT: mov v3.h[3], v0.h[0]
294 ; CHECK-GI-NEXT: and v0.8b, v1.8b, v3.8b
297 %c = zext <3 x i8> %a to <3 x i16>
301 define <3 x i32> @zext_v3i8_v3i32(<3 x i8> %a) {
302 ; CHECK-SD-LABEL: zext_v3i8_v3i32:
303 ; CHECK-SD: // %bb.0: // %entry
304 ; CHECK-SD-NEXT: fmov s0, w0
305 ; CHECK-SD-NEXT: movi v1.2d, #0x0000ff000000ff
306 ; CHECK-SD-NEXT: mov v0.h[1], w1
307 ; CHECK-SD-NEXT: mov v0.h[2], w2
308 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
309 ; CHECK-SD-NEXT: and v0.16b, v0.16b, v1.16b
312 ; CHECK-GI-LABEL: zext_v3i8_v3i32:
313 ; CHECK-GI: // %bb.0: // %entry
314 ; CHECK-GI-NEXT: mov w8, #255 // =0xff
315 ; CHECK-GI-NEXT: fmov s0, w0
316 ; CHECK-GI-NEXT: fmov s1, w8
317 ; CHECK-GI-NEXT: mov v0.s[1], w1
318 ; CHECK-GI-NEXT: mov v1.s[1], w8
319 ; CHECK-GI-NEXT: mov v0.s[2], w2
320 ; CHECK-GI-NEXT: mov v1.s[2], w8
321 ; CHECK-GI-NEXT: mov v0.s[3], w8
322 ; CHECK-GI-NEXT: mov v1.s[3], w8
323 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
326 %c = zext <3 x i8> %a to <3 x i32>
330 define <3 x i64> @zext_v3i8_v3i64(<3 x i8> %a) {
331 ; CHECK-SD-LABEL: zext_v3i8_v3i64:
332 ; CHECK-SD: // %bb.0: // %entry
333 ; CHECK-SD-NEXT: fmov s0, w0
334 ; CHECK-SD-NEXT: movi v1.2d, #0x000000000000ff
335 ; CHECK-SD-NEXT: fmov s3, w2
336 ; CHECK-SD-NEXT: movi v2.2d, #0000000000000000
337 ; CHECK-SD-NEXT: mov v0.s[1], w1
338 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
339 ; CHECK-SD-NEXT: and v0.16b, v0.16b, v1.16b
340 ; CHECK-SD-NEXT: ushll v1.2d, v3.2s, #0
341 ; CHECK-SD-NEXT: mov v2.b[0], v1.b[0]
342 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
343 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
344 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
345 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
348 ; CHECK-GI-LABEL: zext_v3i8_v3i64:
349 ; CHECK-GI: // %bb.0: // %entry
350 ; CHECK-GI-NEXT: // kill: def $w0 killed $w0 def $x0
351 ; CHECK-GI-NEXT: fmov d0, x0
352 ; CHECK-GI-NEXT: // kill: def $w1 killed $w1 def $x1
353 ; CHECK-GI-NEXT: adrp x8, .LCPI21_0
354 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
355 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI21_0]
356 ; CHECK-GI-NEXT: and x8, x2, #0xff
357 ; CHECK-GI-NEXT: fmov d2, x8
358 ; CHECK-GI-NEXT: mov v0.d[1], x1
359 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
360 ; CHECK-GI-NEXT: mov d1, v0.d[1]
361 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
364 %c = zext <3 x i8> %a to <3 x i64>
368 define <3 x i32> @zext_v3i16_v3i32(<3 x i16> %a) {
369 ; CHECK-SD-LABEL: zext_v3i16_v3i32:
370 ; CHECK-SD: // %bb.0: // %entry
371 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
374 ; CHECK-GI-LABEL: zext_v3i16_v3i32:
375 ; CHECK-GI: // %bb.0: // %entry
376 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
377 ; CHECK-GI-NEXT: mov h1, v0.h[1]
378 ; CHECK-GI-NEXT: fmov w8, s0
379 ; CHECK-GI-NEXT: mov h2, v0.h[2]
380 ; CHECK-GI-NEXT: uxth w8, w8
381 ; CHECK-GI-NEXT: fmov w9, s1
382 ; CHECK-GI-NEXT: fmov s0, w8
383 ; CHECK-GI-NEXT: fmov w8, s2
384 ; CHECK-GI-NEXT: uxth w9, w9
385 ; CHECK-GI-NEXT: uxth w8, w8
386 ; CHECK-GI-NEXT: mov v0.s[1], w9
387 ; CHECK-GI-NEXT: mov v0.s[2], w8
388 ; CHECK-GI-NEXT: mov v0.s[3], w8
391 %c = zext <3 x i16> %a to <3 x i32>
395 define <3 x i64> @zext_v3i16_v3i64(<3 x i16> %a) {
396 ; CHECK-SD-LABEL: zext_v3i16_v3i64:
397 ; CHECK-SD: // %bb.0: // %entry
398 ; CHECK-SD-NEXT: ushll v2.4s, v0.4h, #0
399 ; CHECK-SD-NEXT: ushll v0.2d, v2.2s, #0
400 ; CHECK-SD-NEXT: ushll2 v2.2d, v2.4s, #0
401 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
402 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
403 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
404 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
407 ; CHECK-GI-LABEL: zext_v3i16_v3i64:
408 ; CHECK-GI: // %bb.0: // %entry
409 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
410 ; CHECK-GI-NEXT: mov h1, v0.h[1]
411 ; CHECK-GI-NEXT: mov h2, v0.h[2]
412 ; CHECK-GI-NEXT: fmov w8, s0
413 ; CHECK-GI-NEXT: ubfx x8, x8, #0, #16
414 ; CHECK-GI-NEXT: fmov w9, s1
415 ; CHECK-GI-NEXT: fmov w10, s2
416 ; CHECK-GI-NEXT: fmov d0, x8
417 ; CHECK-GI-NEXT: ubfx x9, x9, #0, #16
418 ; CHECK-GI-NEXT: ubfx x10, x10, #0, #16
419 ; CHECK-GI-NEXT: fmov d1, x9
420 ; CHECK-GI-NEXT: fmov d2, x10
423 %c = zext <3 x i16> %a to <3 x i64>
427 define <3 x i64> @zext_v3i32_v3i64(<3 x i32> %a) {
428 ; CHECK-SD-LABEL: zext_v3i32_v3i64:
429 ; CHECK-SD: // %bb.0: // %entry
430 ; CHECK-SD-NEXT: ushll v3.2d, v0.2s, #0
431 ; CHECK-SD-NEXT: ushll2 v2.2d, v0.4s, #0
432 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
433 ; CHECK-SD-NEXT: fmov d0, d3
434 ; CHECK-SD-NEXT: ext v1.16b, v3.16b, v3.16b, #8
435 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
438 ; CHECK-GI-LABEL: zext_v3i32_v3i64:
439 ; CHECK-GI: // %bb.0: // %entry
440 ; CHECK-GI-NEXT: mov s1, v0.s[1]
441 ; CHECK-GI-NEXT: mov s2, v0.s[2]
442 ; CHECK-GI-NEXT: fmov w8, s0
443 ; CHECK-GI-NEXT: fmov d0, x8
444 ; CHECK-GI-NEXT: fmov w9, s1
445 ; CHECK-GI-NEXT: fmov w10, s2
446 ; CHECK-GI-NEXT: fmov d1, x9
447 ; CHECK-GI-NEXT: fmov d2, x10
450 %c = zext <3 x i32> %a to <3 x i64>
454 define <3 x i16> @zext_v3i10_v3i16(<3 x i10> %a) {
455 ; CHECK-SD-LABEL: zext_v3i10_v3i16:
456 ; CHECK-SD: // %bb.0: // %entry
457 ; CHECK-SD-NEXT: fmov s0, w0
458 ; CHECK-SD-NEXT: mov v0.h[1], w1
459 ; CHECK-SD-NEXT: mov v0.h[2], w2
460 ; CHECK-SD-NEXT: bic v0.4h, #252, lsl #8
461 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
464 ; CHECK-GI-LABEL: zext_v3i10_v3i16:
465 ; CHECK-GI: // %bb.0: // %entry
466 ; CHECK-GI-NEXT: mov w8, #1023 // =0x3ff
467 ; CHECK-GI-NEXT: fmov s1, w0
468 ; CHECK-GI-NEXT: fmov s2, w1
469 ; CHECK-GI-NEXT: fmov s0, w8
470 ; CHECK-GI-NEXT: mov v1.h[1], v2.h[0]
471 ; CHECK-GI-NEXT: fmov s2, w2
472 ; CHECK-GI-NEXT: mov v3.16b, v0.16b
473 ; CHECK-GI-NEXT: mov v3.h[1], v0.h[0]
474 ; CHECK-GI-NEXT: mov v1.h[2], v2.h[0]
475 ; CHECK-GI-NEXT: mov v3.h[2], v0.h[0]
476 ; CHECK-GI-NEXT: mov v1.h[3], v0.h[0]
477 ; CHECK-GI-NEXT: mov v3.h[3], v0.h[0]
478 ; CHECK-GI-NEXT: and v0.8b, v1.8b, v3.8b
481 %c = zext <3 x i10> %a to <3 x i16>
485 define <3 x i32> @zext_v3i10_v3i32(<3 x i10> %a) {
486 ; CHECK-SD-LABEL: zext_v3i10_v3i32:
487 ; CHECK-SD: // %bb.0: // %entry
488 ; CHECK-SD-NEXT: fmov s0, w0
489 ; CHECK-SD-NEXT: movi v1.4s, #3, msl #8
490 ; CHECK-SD-NEXT: mov v0.h[1], w1
491 ; CHECK-SD-NEXT: mov v0.h[2], w2
492 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
493 ; CHECK-SD-NEXT: and v0.16b, v0.16b, v1.16b
496 ; CHECK-GI-LABEL: zext_v3i10_v3i32:
497 ; CHECK-GI: // %bb.0: // %entry
498 ; CHECK-GI-NEXT: mov w8, #1023 // =0x3ff
499 ; CHECK-GI-NEXT: fmov s0, w0
500 ; CHECK-GI-NEXT: fmov s1, w8
501 ; CHECK-GI-NEXT: mov v0.s[1], w1
502 ; CHECK-GI-NEXT: mov v1.s[1], w8
503 ; CHECK-GI-NEXT: mov v0.s[2], w2
504 ; CHECK-GI-NEXT: mov v1.s[2], w8
505 ; CHECK-GI-NEXT: mov v0.s[3], w8
506 ; CHECK-GI-NEXT: mov v1.s[3], w8
507 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
510 %c = zext <3 x i10> %a to <3 x i32>
514 define <3 x i64> @zext_v3i10_v3i64(<3 x i10> %a) {
515 ; CHECK-SD-LABEL: zext_v3i10_v3i64:
516 ; CHECK-SD: // %bb.0: // %entry
517 ; CHECK-SD-NEXT: fmov s0, w0
518 ; CHECK-SD-NEXT: fmov s1, w2
519 ; CHECK-SD-NEXT: mov w8, #1023 // =0x3ff
520 ; CHECK-SD-NEXT: dup v2.2d, x8
521 ; CHECK-SD-NEXT: mov v0.s[1], w1
522 ; CHECK-SD-NEXT: ushll v3.2d, v1.2s, #0
523 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
524 ; CHECK-SD-NEXT: and v0.16b, v0.16b, v2.16b
525 ; CHECK-SD-NEXT: and v2.8b, v3.8b, v2.8b
526 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
527 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
528 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
531 ; CHECK-GI-LABEL: zext_v3i10_v3i64:
532 ; CHECK-GI: // %bb.0: // %entry
533 ; CHECK-GI-NEXT: // kill: def $w0 killed $w0 def $x0
534 ; CHECK-GI-NEXT: fmov d0, x0
535 ; CHECK-GI-NEXT: // kill: def $w1 killed $w1 def $x1
536 ; CHECK-GI-NEXT: adrp x8, .LCPI27_0
537 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
538 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI27_0]
539 ; CHECK-GI-NEXT: and x8, x2, #0x3ff
540 ; CHECK-GI-NEXT: fmov d2, x8
541 ; CHECK-GI-NEXT: mov v0.d[1], x1
542 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
543 ; CHECK-GI-NEXT: mov d1, v0.d[1]
544 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
547 %c = zext <3 x i10> %a to <3 x i64>
551 define <4 x i16> @zext_v4i8_v4i16(<4 x i8> %a) {
552 ; CHECK-SD-LABEL: zext_v4i8_v4i16:
553 ; CHECK-SD: // %bb.0: // %entry
554 ; CHECK-SD-NEXT: bic v0.4h, #255, lsl #8
557 ; CHECK-GI-LABEL: zext_v4i8_v4i16:
558 ; CHECK-GI: // %bb.0: // %entry
559 ; CHECK-GI-NEXT: adrp x8, .LCPI28_0
560 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI28_0]
561 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
564 %c = zext <4 x i8> %a to <4 x i16>
568 define <4 x i32> @zext_v4i8_v4i32(<4 x i8> %a) {
569 ; CHECK-SD-LABEL: zext_v4i8_v4i32:
570 ; CHECK-SD: // %bb.0: // %entry
571 ; CHECK-SD-NEXT: bic v0.4h, #255, lsl #8
572 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
575 ; CHECK-GI-LABEL: zext_v4i8_v4i32:
576 ; CHECK-GI: // %bb.0: // %entry
577 ; CHECK-GI-NEXT: adrp x8, .LCPI29_0
578 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
579 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI29_0]
580 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
583 %c = zext <4 x i8> %a to <4 x i32>
587 define <4 x i64> @zext_v4i8_v4i64(<4 x i8> %a) {
588 ; CHECK-SD-LABEL: zext_v4i8_v4i64:
589 ; CHECK-SD: // %bb.0: // %entry
590 ; CHECK-SD-NEXT: bic v0.4h, #255, lsl #8
591 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
592 ; CHECK-SD-NEXT: ushll2 v1.2d, v0.4s, #0
593 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
596 ; CHECK-GI-LABEL: zext_v4i8_v4i64:
597 ; CHECK-GI: // %bb.0: // %entry
598 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
599 ; CHECK-GI-NEXT: adrp x8, .LCPI30_0
600 ; CHECK-GI-NEXT: ldr q3, [x8, :lo12:.LCPI30_0]
601 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
602 ; CHECK-GI-NEXT: ushll2 v2.2d, v0.4s, #0
603 ; CHECK-GI-NEXT: and v0.16b, v1.16b, v3.16b
604 ; CHECK-GI-NEXT: and v1.16b, v2.16b, v3.16b
607 %c = zext <4 x i8> %a to <4 x i64>
611 define <4 x i32> @zext_v4i16_v4i32(<4 x i16> %a) {
612 ; CHECK-LABEL: zext_v4i16_v4i32:
613 ; CHECK: // %bb.0: // %entry
614 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
617 %c = zext <4 x i16> %a to <4 x i32>
621 define <4 x i64> @zext_v4i16_v4i64(<4 x i16> %a) {
622 ; CHECK-SD-LABEL: zext_v4i16_v4i64:
623 ; CHECK-SD: // %bb.0: // %entry
624 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
625 ; CHECK-SD-NEXT: ushll2 v1.2d, v0.4s, #0
626 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
629 ; CHECK-GI-LABEL: zext_v4i16_v4i64:
630 ; CHECK-GI: // %bb.0: // %entry
631 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
632 ; CHECK-GI-NEXT: ushll v0.2d, v1.2s, #0
633 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
636 %c = zext <4 x i16> %a to <4 x i64>
640 define <4 x i64> @zext_v4i32_v4i64(<4 x i32> %a) {
641 ; CHECK-SD-LABEL: zext_v4i32_v4i64:
642 ; CHECK-SD: // %bb.0: // %entry
643 ; CHECK-SD-NEXT: ushll2 v1.2d, v0.4s, #0
644 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
647 ; CHECK-GI-LABEL: zext_v4i32_v4i64:
648 ; CHECK-GI: // %bb.0: // %entry
649 ; CHECK-GI-NEXT: ushll v2.2d, v0.2s, #0
650 ; CHECK-GI-NEXT: ushll2 v1.2d, v0.4s, #0
651 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
654 %c = zext <4 x i32> %a to <4 x i64>
658 define <4 x i16> @zext_v4i10_v4i16(<4 x i10> %a) {
659 ; CHECK-SD-LABEL: zext_v4i10_v4i16:
660 ; CHECK-SD: // %bb.0: // %entry
661 ; CHECK-SD-NEXT: bic v0.4h, #252, lsl #8
664 ; CHECK-GI-LABEL: zext_v4i10_v4i16:
665 ; CHECK-GI: // %bb.0: // %entry
666 ; CHECK-GI-NEXT: adrp x8, .LCPI34_0
667 ; CHECK-GI-NEXT: ldr d1, [x8, :lo12:.LCPI34_0]
668 ; CHECK-GI-NEXT: and v0.8b, v0.8b, v1.8b
671 %c = zext <4 x i10> %a to <4 x i16>
675 define <4 x i32> @zext_v4i10_v4i32(<4 x i10> %a) {
676 ; CHECK-SD-LABEL: zext_v4i10_v4i32:
677 ; CHECK-SD: // %bb.0: // %entry
678 ; CHECK-SD-NEXT: bic v0.4h, #252, lsl #8
679 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
682 ; CHECK-GI-LABEL: zext_v4i10_v4i32:
683 ; CHECK-GI: // %bb.0: // %entry
684 ; CHECK-GI-NEXT: adrp x8, .LCPI35_0
685 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
686 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI35_0]
687 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
690 %c = zext <4 x i10> %a to <4 x i32>
694 define <4 x i64> @zext_v4i10_v4i64(<4 x i10> %a) {
695 ; CHECK-SD-LABEL: zext_v4i10_v4i64:
696 ; CHECK-SD: // %bb.0: // %entry
697 ; CHECK-SD-NEXT: bic v0.4h, #252, lsl #8
698 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
699 ; CHECK-SD-NEXT: ushll2 v1.2d, v0.4s, #0
700 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
703 ; CHECK-GI-LABEL: zext_v4i10_v4i64:
704 ; CHECK-GI: // %bb.0: // %entry
705 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
706 ; CHECK-GI-NEXT: adrp x8, .LCPI36_0
707 ; CHECK-GI-NEXT: ldr q3, [x8, :lo12:.LCPI36_0]
708 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
709 ; CHECK-GI-NEXT: ushll2 v2.2d, v0.4s, #0
710 ; CHECK-GI-NEXT: and v0.16b, v1.16b, v3.16b
711 ; CHECK-GI-NEXT: and v1.16b, v2.16b, v3.16b
714 %c = zext <4 x i10> %a to <4 x i64>
718 define <8 x i16> @zext_v8i8_v8i16(<8 x i8> %a) {
719 ; CHECK-LABEL: zext_v8i8_v8i16:
720 ; CHECK: // %bb.0: // %entry
721 ; CHECK-NEXT: ushll v0.8h, v0.8b, #0
724 %c = zext <8 x i8> %a to <8 x i16>
728 define <8 x i32> @zext_v8i8_v8i32(<8 x i8> %a) {
729 ; CHECK-SD-LABEL: zext_v8i8_v8i32:
730 ; CHECK-SD: // %bb.0: // %entry
731 ; CHECK-SD-NEXT: ushll v0.8h, v0.8b, #0
732 ; CHECK-SD-NEXT: ushll2 v1.4s, v0.8h, #0
733 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
736 ; CHECK-GI-LABEL: zext_v8i8_v8i32:
737 ; CHECK-GI: // %bb.0: // %entry
738 ; CHECK-GI-NEXT: ushll v1.8h, v0.8b, #0
739 ; CHECK-GI-NEXT: ushll v0.4s, v1.4h, #0
740 ; CHECK-GI-NEXT: ushll2 v1.4s, v1.8h, #0
743 %c = zext <8 x i8> %a to <8 x i32>
747 define <8 x i64> @zext_v8i8_v8i64(<8 x i8> %a) {
748 ; CHECK-SD-LABEL: zext_v8i8_v8i64:
749 ; CHECK-SD: // %bb.0: // %entry
750 ; CHECK-SD-NEXT: ushll v0.8h, v0.8b, #0
751 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
752 ; CHECK-SD-NEXT: ushll2 v2.4s, v0.8h, #0
753 ; CHECK-SD-NEXT: ushll v0.2d, v1.2s, #0
754 ; CHECK-SD-NEXT: ushll2 v3.2d, v2.4s, #0
755 ; CHECK-SD-NEXT: ushll2 v1.2d, v1.4s, #0
756 ; CHECK-SD-NEXT: ushll v2.2d, v2.2s, #0
759 ; CHECK-GI-LABEL: zext_v8i8_v8i64:
760 ; CHECK-GI: // %bb.0: // %entry
761 ; CHECK-GI-NEXT: ushll v0.8h, v0.8b, #0
762 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
763 ; CHECK-GI-NEXT: ushll2 v3.4s, v0.8h, #0
764 ; CHECK-GI-NEXT: ushll v0.2d, v1.2s, #0
765 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
766 ; CHECK-GI-NEXT: ushll v2.2d, v3.2s, #0
767 ; CHECK-GI-NEXT: ushll2 v3.2d, v3.4s, #0
770 %c = zext <8 x i8> %a to <8 x i64>
774 define <8 x i32> @zext_v8i16_v8i32(<8 x i16> %a) {
775 ; CHECK-SD-LABEL: zext_v8i16_v8i32:
776 ; CHECK-SD: // %bb.0: // %entry
777 ; CHECK-SD-NEXT: ushll2 v1.4s, v0.8h, #0
778 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
781 ; CHECK-GI-LABEL: zext_v8i16_v8i32:
782 ; CHECK-GI: // %bb.0: // %entry
783 ; CHECK-GI-NEXT: ushll v2.4s, v0.4h, #0
784 ; CHECK-GI-NEXT: ushll2 v1.4s, v0.8h, #0
785 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
788 %c = zext <8 x i16> %a to <8 x i32>
792 define <8 x i64> @zext_v8i16_v8i64(<8 x i16> %a) {
793 ; CHECK-SD-LABEL: zext_v8i16_v8i64:
794 ; CHECK-SD: // %bb.0: // %entry
795 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
796 ; CHECK-SD-NEXT: ushll2 v2.4s, v0.8h, #0
797 ; CHECK-SD-NEXT: ushll v0.2d, v1.2s, #0
798 ; CHECK-SD-NEXT: ushll2 v3.2d, v2.4s, #0
799 ; CHECK-SD-NEXT: ushll2 v1.2d, v1.4s, #0
800 ; CHECK-SD-NEXT: ushll v2.2d, v2.2s, #0
803 ; CHECK-GI-LABEL: zext_v8i16_v8i64:
804 ; CHECK-GI: // %bb.0: // %entry
805 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
806 ; CHECK-GI-NEXT: ushll2 v3.4s, v0.8h, #0
807 ; CHECK-GI-NEXT: ushll v0.2d, v1.2s, #0
808 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
809 ; CHECK-GI-NEXT: ushll v2.2d, v3.2s, #0
810 ; CHECK-GI-NEXT: ushll2 v3.2d, v3.4s, #0
813 %c = zext <8 x i16> %a to <8 x i64>
817 define <8 x i64> @zext_v8i32_v8i64(<8 x i32> %a) {
818 ; CHECK-SD-LABEL: zext_v8i32_v8i64:
819 ; CHECK-SD: // %bb.0: // %entry
820 ; CHECK-SD-NEXT: ushll v5.2d, v0.2s, #0
821 ; CHECK-SD-NEXT: ushll2 v4.2d, v0.4s, #0
822 ; CHECK-SD-NEXT: ushll2 v3.2d, v1.4s, #0
823 ; CHECK-SD-NEXT: ushll v2.2d, v1.2s, #0
824 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
825 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
828 ; CHECK-GI-LABEL: zext_v8i32_v8i64:
829 ; CHECK-GI: // %bb.0: // %entry
830 ; CHECK-GI-NEXT: ushll v4.2d, v0.2s, #0
831 ; CHECK-GI-NEXT: ushll2 v5.2d, v0.4s, #0
832 ; CHECK-GI-NEXT: ushll v2.2d, v1.2s, #0
833 ; CHECK-GI-NEXT: ushll2 v3.2d, v1.4s, #0
834 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
835 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
838 %c = zext <8 x i32> %a to <8 x i64>
842 define <8 x i16> @zext_v8i10_v8i16(<8 x i10> %a) {
843 ; CHECK-SD-LABEL: zext_v8i10_v8i16:
844 ; CHECK-SD: // %bb.0: // %entry
845 ; CHECK-SD-NEXT: bic v0.8h, #252, lsl #8
848 ; CHECK-GI-LABEL: zext_v8i10_v8i16:
849 ; CHECK-GI: // %bb.0: // %entry
850 ; CHECK-GI-NEXT: adrp x8, .LCPI43_0
851 ; CHECK-GI-NEXT: ldr q1, [x8, :lo12:.LCPI43_0]
852 ; CHECK-GI-NEXT: and v0.16b, v0.16b, v1.16b
855 %c = zext <8 x i10> %a to <8 x i16>
859 define <8 x i32> @zext_v8i10_v8i32(<8 x i10> %a) {
860 ; CHECK-SD-LABEL: zext_v8i10_v8i32:
861 ; CHECK-SD: // %bb.0: // %entry
862 ; CHECK-SD-NEXT: bic v0.8h, #252, lsl #8
863 ; CHECK-SD-NEXT: ushll2 v1.4s, v0.8h, #0
864 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
867 ; CHECK-GI-LABEL: zext_v8i10_v8i32:
868 ; CHECK-GI: // %bb.0: // %entry
869 ; CHECK-GI-NEXT: adrp x8, .LCPI44_0
870 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
871 ; CHECK-GI-NEXT: ushll2 v2.4s, v0.8h, #0
872 ; CHECK-GI-NEXT: ldr q3, [x8, :lo12:.LCPI44_0]
873 ; CHECK-GI-NEXT: and v0.16b, v1.16b, v3.16b
874 ; CHECK-GI-NEXT: and v1.16b, v2.16b, v3.16b
877 %c = zext <8 x i10> %a to <8 x i32>
881 define <8 x i64> @zext_v8i10_v8i64(<8 x i10> %a) {
882 ; CHECK-SD-LABEL: zext_v8i10_v8i64:
883 ; CHECK-SD: // %bb.0: // %entry
884 ; CHECK-SD-NEXT: bic v0.8h, #252, lsl #8
885 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
886 ; CHECK-SD-NEXT: ushll2 v2.4s, v0.8h, #0
887 ; CHECK-SD-NEXT: ushll v0.2d, v1.2s, #0
888 ; CHECK-SD-NEXT: ushll2 v3.2d, v2.4s, #0
889 ; CHECK-SD-NEXT: ushll2 v1.2d, v1.4s, #0
890 ; CHECK-SD-NEXT: ushll v2.2d, v2.2s, #0
893 ; CHECK-GI-LABEL: zext_v8i10_v8i64:
894 ; CHECK-GI: // %bb.0: // %entry
895 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
896 ; CHECK-GI-NEXT: ushll2 v0.4s, v0.8h, #0
897 ; CHECK-GI-NEXT: adrp x8, .LCPI45_0
898 ; CHECK-GI-NEXT: ldr q3, [x8, :lo12:.LCPI45_0]
899 ; CHECK-GI-NEXT: ushll v2.2d, v1.2s, #0
900 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
901 ; CHECK-GI-NEXT: ushll v4.2d, v0.2s, #0
902 ; CHECK-GI-NEXT: ushll2 v5.2d, v0.4s, #0
903 ; CHECK-GI-NEXT: and v0.16b, v2.16b, v3.16b
904 ; CHECK-GI-NEXT: and v1.16b, v1.16b, v3.16b
905 ; CHECK-GI-NEXT: and v2.16b, v4.16b, v3.16b
906 ; CHECK-GI-NEXT: and v3.16b, v5.16b, v3.16b
909 %c = zext <8 x i10> %a to <8 x i64>
913 define <16 x i16> @zext_v16i8_v16i16(<16 x i8> %a) {
914 ; CHECK-SD-LABEL: zext_v16i8_v16i16:
915 ; CHECK-SD: // %bb.0: // %entry
916 ; CHECK-SD-NEXT: ushll2 v1.8h, v0.16b, #0
917 ; CHECK-SD-NEXT: ushll v0.8h, v0.8b, #0
920 ; CHECK-GI-LABEL: zext_v16i8_v16i16:
921 ; CHECK-GI: // %bb.0: // %entry
922 ; CHECK-GI-NEXT: ushll v2.8h, v0.8b, #0
923 ; CHECK-GI-NEXT: ushll2 v1.8h, v0.16b, #0
924 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
927 %c = zext <16 x i8> %a to <16 x i16>
931 define <16 x i32> @zext_v16i8_v16i32(<16 x i8> %a) {
932 ; CHECK-SD-LABEL: zext_v16i8_v16i32:
933 ; CHECK-SD: // %bb.0: // %entry
934 ; CHECK-SD-NEXT: ushll v1.8h, v0.8b, #0
935 ; CHECK-SD-NEXT: ushll2 v2.8h, v0.16b, #0
936 ; CHECK-SD-NEXT: ushll v0.4s, v1.4h, #0
937 ; CHECK-SD-NEXT: ushll2 v3.4s, v2.8h, #0
938 ; CHECK-SD-NEXT: ushll2 v1.4s, v1.8h, #0
939 ; CHECK-SD-NEXT: ushll v2.4s, v2.4h, #0
942 ; CHECK-GI-LABEL: zext_v16i8_v16i32:
943 ; CHECK-GI: // %bb.0: // %entry
944 ; CHECK-GI-NEXT: ushll v1.8h, v0.8b, #0
945 ; CHECK-GI-NEXT: ushll2 v3.8h, v0.16b, #0
946 ; CHECK-GI-NEXT: ushll v0.4s, v1.4h, #0
947 ; CHECK-GI-NEXT: ushll2 v1.4s, v1.8h, #0
948 ; CHECK-GI-NEXT: ushll v2.4s, v3.4h, #0
949 ; CHECK-GI-NEXT: ushll2 v3.4s, v3.8h, #0
952 %c = zext <16 x i8> %a to <16 x i32>
956 define <16 x i64> @zext_v16i8_v16i64(<16 x i8> %a) {
957 ; CHECK-SD-LABEL: zext_v16i8_v16i64:
958 ; CHECK-SD: // %bb.0: // %entry
959 ; CHECK-SD-NEXT: ushll v1.8h, v0.8b, #0
960 ; CHECK-SD-NEXT: ushll2 v0.8h, v0.16b, #0
961 ; CHECK-SD-NEXT: ushll v2.4s, v1.4h, #0
962 ; CHECK-SD-NEXT: ushll2 v4.4s, v1.8h, #0
963 ; CHECK-SD-NEXT: ushll v5.4s, v0.4h, #0
964 ; CHECK-SD-NEXT: ushll2 v6.4s, v0.8h, #0
965 ; CHECK-SD-NEXT: ushll2 v1.2d, v2.4s, #0
966 ; CHECK-SD-NEXT: ushll v0.2d, v2.2s, #0
967 ; CHECK-SD-NEXT: ushll2 v3.2d, v4.4s, #0
968 ; CHECK-SD-NEXT: ushll v2.2d, v4.2s, #0
969 ; CHECK-SD-NEXT: ushll v4.2d, v5.2s, #0
970 ; CHECK-SD-NEXT: ushll2 v7.2d, v6.4s, #0
971 ; CHECK-SD-NEXT: ushll2 v5.2d, v5.4s, #0
972 ; CHECK-SD-NEXT: ushll v6.2d, v6.2s, #0
975 ; CHECK-GI-LABEL: zext_v16i8_v16i64:
976 ; CHECK-GI: // %bb.0: // %entry
977 ; CHECK-GI-NEXT: ushll v1.8h, v0.8b, #0
978 ; CHECK-GI-NEXT: ushll2 v0.8h, v0.16b, #0
979 ; CHECK-GI-NEXT: ushll v2.4s, v1.4h, #0
980 ; CHECK-GI-NEXT: ushll2 v3.4s, v1.8h, #0
981 ; CHECK-GI-NEXT: ushll v5.4s, v0.4h, #0
982 ; CHECK-GI-NEXT: ushll2 v7.4s, v0.8h, #0
983 ; CHECK-GI-NEXT: ushll v0.2d, v2.2s, #0
984 ; CHECK-GI-NEXT: ushll2 v1.2d, v2.4s, #0
985 ; CHECK-GI-NEXT: ushll v2.2d, v3.2s, #0
986 ; CHECK-GI-NEXT: ushll2 v3.2d, v3.4s, #0
987 ; CHECK-GI-NEXT: ushll v4.2d, v5.2s, #0
988 ; CHECK-GI-NEXT: ushll2 v5.2d, v5.4s, #0
989 ; CHECK-GI-NEXT: ushll v6.2d, v7.2s, #0
990 ; CHECK-GI-NEXT: ushll2 v7.2d, v7.4s, #0
993 %c = zext <16 x i8> %a to <16 x i64>
997 define <16 x i32> @zext_v16i16_v16i32(<16 x i16> %a) {
998 ; CHECK-SD-LABEL: zext_v16i16_v16i32:
999 ; CHECK-SD: // %bb.0: // %entry
1000 ; CHECK-SD-NEXT: ushll v5.4s, v0.4h, #0
1001 ; CHECK-SD-NEXT: ushll2 v4.4s, v0.8h, #0
1002 ; CHECK-SD-NEXT: ushll2 v3.4s, v1.8h, #0
1003 ; CHECK-SD-NEXT: ushll v2.4s, v1.4h, #0
1004 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
1005 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
1006 ; CHECK-SD-NEXT: ret
1008 ; CHECK-GI-LABEL: zext_v16i16_v16i32:
1009 ; CHECK-GI: // %bb.0: // %entry
1010 ; CHECK-GI-NEXT: ushll v4.4s, v0.4h, #0
1011 ; CHECK-GI-NEXT: ushll2 v5.4s, v0.8h, #0
1012 ; CHECK-GI-NEXT: ushll v2.4s, v1.4h, #0
1013 ; CHECK-GI-NEXT: ushll2 v3.4s, v1.8h, #0
1014 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
1015 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
1016 ; CHECK-GI-NEXT: ret
1018 %c = zext <16 x i16> %a to <16 x i32>
1022 define <16 x i64> @zext_v16i16_v16i64(<16 x i16> %a) {
1023 ; CHECK-SD-LABEL: zext_v16i16_v16i64:
1024 ; CHECK-SD: // %bb.0: // %entry
1025 ; CHECK-SD-NEXT: ushll v2.4s, v0.4h, #0
1026 ; CHECK-SD-NEXT: ushll2 v4.4s, v0.8h, #0
1027 ; CHECK-SD-NEXT: ushll v5.4s, v1.4h, #0
1028 ; CHECK-SD-NEXT: ushll2 v6.4s, v1.8h, #0
1029 ; CHECK-SD-NEXT: ushll2 v1.2d, v2.4s, #0
1030 ; CHECK-SD-NEXT: ushll v0.2d, v2.2s, #0
1031 ; CHECK-SD-NEXT: ushll2 v3.2d, v4.4s, #0
1032 ; CHECK-SD-NEXT: ushll v2.2d, v4.2s, #0
1033 ; CHECK-SD-NEXT: ushll v4.2d, v5.2s, #0
1034 ; CHECK-SD-NEXT: ushll2 v7.2d, v6.4s, #0
1035 ; CHECK-SD-NEXT: ushll2 v5.2d, v5.4s, #0
1036 ; CHECK-SD-NEXT: ushll v6.2d, v6.2s, #0
1037 ; CHECK-SD-NEXT: ret
1039 ; CHECK-GI-LABEL: zext_v16i16_v16i64:
1040 ; CHECK-GI: // %bb.0: // %entry
1041 ; CHECK-GI-NEXT: ushll v2.4s, v0.4h, #0
1042 ; CHECK-GI-NEXT: ushll2 v3.4s, v0.8h, #0
1043 ; CHECK-GI-NEXT: ushll v5.4s, v1.4h, #0
1044 ; CHECK-GI-NEXT: ushll2 v7.4s, v1.8h, #0
1045 ; CHECK-GI-NEXT: ushll v0.2d, v2.2s, #0
1046 ; CHECK-GI-NEXT: ushll2 v1.2d, v2.4s, #0
1047 ; CHECK-GI-NEXT: ushll v2.2d, v3.2s, #0
1048 ; CHECK-GI-NEXT: ushll2 v3.2d, v3.4s, #0
1049 ; CHECK-GI-NEXT: ushll v4.2d, v5.2s, #0
1050 ; CHECK-GI-NEXT: ushll2 v5.2d, v5.4s, #0
1051 ; CHECK-GI-NEXT: ushll v6.2d, v7.2s, #0
1052 ; CHECK-GI-NEXT: ushll2 v7.2d, v7.4s, #0
1053 ; CHECK-GI-NEXT: ret
1055 %c = zext <16 x i16> %a to <16 x i64>
1059 define <16 x i64> @zext_v16i32_v16i64(<16 x i32> %a) {
1060 ; CHECK-SD-LABEL: zext_v16i32_v16i64:
1061 ; CHECK-SD: // %bb.0: // %entry
1062 ; CHECK-SD-NEXT: ushll2 v17.2d, v0.4s, #0
1063 ; CHECK-SD-NEXT: ushll2 v16.2d, v1.4s, #0
1064 ; CHECK-SD-NEXT: ushll v18.2d, v1.2s, #0
1065 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
1066 ; CHECK-SD-NEXT: ushll v4.2d, v2.2s, #0
1067 ; CHECK-SD-NEXT: ushll2 v5.2d, v2.4s, #0
1068 ; CHECK-SD-NEXT: ushll2 v7.2d, v3.4s, #0
1069 ; CHECK-SD-NEXT: ushll v6.2d, v3.2s, #0
1070 ; CHECK-SD-NEXT: mov v1.16b, v17.16b
1071 ; CHECK-SD-NEXT: mov v2.16b, v18.16b
1072 ; CHECK-SD-NEXT: mov v3.16b, v16.16b
1073 ; CHECK-SD-NEXT: ret
1075 ; CHECK-GI-LABEL: zext_v16i32_v16i64:
1076 ; CHECK-GI: // %bb.0: // %entry
1077 ; CHECK-GI-NEXT: ushll v16.2d, v0.2s, #0
1078 ; CHECK-GI-NEXT: ushll2 v17.2d, v0.4s, #0
1079 ; CHECK-GI-NEXT: ushll v18.2d, v1.2s, #0
1080 ; CHECK-GI-NEXT: ushll2 v19.2d, v1.4s, #0
1081 ; CHECK-GI-NEXT: ushll v4.2d, v2.2s, #0
1082 ; CHECK-GI-NEXT: ushll2 v5.2d, v2.4s, #0
1083 ; CHECK-GI-NEXT: ushll v6.2d, v3.2s, #0
1084 ; CHECK-GI-NEXT: ushll2 v7.2d, v3.4s, #0
1085 ; CHECK-GI-NEXT: mov v0.16b, v16.16b
1086 ; CHECK-GI-NEXT: mov v1.16b, v17.16b
1087 ; CHECK-GI-NEXT: mov v2.16b, v18.16b
1088 ; CHECK-GI-NEXT: mov v3.16b, v19.16b
1089 ; CHECK-GI-NEXT: ret
1091 %c = zext <16 x i32> %a to <16 x i64>
1095 define <16 x i16> @zext_v16i10_v16i16(<16 x i10> %a) {
1096 ; CHECK-LABEL: zext_v16i10_v16i16:
1097 ; CHECK: // %bb.0: // %entry
1098 ; CHECK-NEXT: ldr w8, [sp]
1099 ; CHECK-NEXT: fmov s0, w0
1100 ; CHECK-NEXT: ldr w9, [sp, #8]
1101 ; CHECK-NEXT: fmov s1, w8
1102 ; CHECK-NEXT: ldr w8, [sp, #16]
1103 ; CHECK-NEXT: mov v0.h[1], w1
1104 ; CHECK-NEXT: mov v1.h[1], w9
1105 ; CHECK-NEXT: mov v0.h[2], w2
1106 ; CHECK-NEXT: mov v1.h[2], w8
1107 ; CHECK-NEXT: ldr w8, [sp, #24]
1108 ; CHECK-NEXT: mov v0.h[3], w3
1109 ; CHECK-NEXT: mov v1.h[3], w8
1110 ; CHECK-NEXT: ldr w8, [sp, #32]
1111 ; CHECK-NEXT: mov v0.h[4], w4
1112 ; CHECK-NEXT: mov v1.h[4], w8
1113 ; CHECK-NEXT: ldr w8, [sp, #40]
1114 ; CHECK-NEXT: mov v0.h[5], w5
1115 ; CHECK-NEXT: mov v1.h[5], w8
1116 ; CHECK-NEXT: ldr w8, [sp, #48]
1117 ; CHECK-NEXT: mov v0.h[6], w6
1118 ; CHECK-NEXT: mov v1.h[6], w8
1119 ; CHECK-NEXT: ldr w8, [sp, #56]
1120 ; CHECK-NEXT: mov v0.h[7], w7
1121 ; CHECK-NEXT: mov v1.h[7], w8
1122 ; CHECK-NEXT: bic v0.8h, #252, lsl #8
1123 ; CHECK-NEXT: bic v1.8h, #252, lsl #8
1126 %c = zext <16 x i10> %a to <16 x i16>
1130 define <16 x i32> @zext_v16i10_v16i32(<16 x i10> %a) {
1131 ; CHECK-SD-LABEL: zext_v16i10_v16i32:
1132 ; CHECK-SD: // %bb.0: // %entry
1133 ; CHECK-SD-NEXT: ldr w8, [sp, #32]
1134 ; CHECK-SD-NEXT: ldr w9, [sp]
1135 ; CHECK-SD-NEXT: fmov s0, w0
1136 ; CHECK-SD-NEXT: fmov s1, w4
1137 ; CHECK-SD-NEXT: ldr w10, [sp, #40]
1138 ; CHECK-SD-NEXT: ldr w11, [sp, #8]
1139 ; CHECK-SD-NEXT: fmov s2, w9
1140 ; CHECK-SD-NEXT: fmov s3, w8
1141 ; CHECK-SD-NEXT: ldr w8, [sp, #48]
1142 ; CHECK-SD-NEXT: mov v0.h[1], w1
1143 ; CHECK-SD-NEXT: ldr w9, [sp, #16]
1144 ; CHECK-SD-NEXT: movi v4.4s, #3, msl #8
1145 ; CHECK-SD-NEXT: mov v1.h[1], w5
1146 ; CHECK-SD-NEXT: mov v2.h[1], w11
1147 ; CHECK-SD-NEXT: mov v3.h[1], w10
1148 ; CHECK-SD-NEXT: mov v0.h[2], w2
1149 ; CHECK-SD-NEXT: mov v1.h[2], w6
1150 ; CHECK-SD-NEXT: mov v2.h[2], w9
1151 ; CHECK-SD-NEXT: mov v3.h[2], w8
1152 ; CHECK-SD-NEXT: ldr w8, [sp, #56]
1153 ; CHECK-SD-NEXT: ldr w9, [sp, #24]
1154 ; CHECK-SD-NEXT: mov v0.h[3], w3
1155 ; CHECK-SD-NEXT: mov v1.h[3], w7
1156 ; CHECK-SD-NEXT: mov v2.h[3], w9
1157 ; CHECK-SD-NEXT: mov v3.h[3], w8
1158 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
1159 ; CHECK-SD-NEXT: ushll v1.4s, v1.4h, #0
1160 ; CHECK-SD-NEXT: ushll v2.4s, v2.4h, #0
1161 ; CHECK-SD-NEXT: ushll v3.4s, v3.4h, #0
1162 ; CHECK-SD-NEXT: and v0.16b, v0.16b, v4.16b
1163 ; CHECK-SD-NEXT: and v1.16b, v1.16b, v4.16b
1164 ; CHECK-SD-NEXT: and v2.16b, v2.16b, v4.16b
1165 ; CHECK-SD-NEXT: and v3.16b, v3.16b, v4.16b
1166 ; CHECK-SD-NEXT: ret
1168 ; CHECK-GI-LABEL: zext_v16i10_v16i32:
1169 ; CHECK-GI: // %bb.0: // %entry
1170 ; CHECK-GI-NEXT: fmov s4, w0
1171 ; CHECK-GI-NEXT: fmov s5, w4
1172 ; CHECK-GI-NEXT: ldr s2, [sp]
1173 ; CHECK-GI-NEXT: ldr s0, [sp, #8]
1174 ; CHECK-GI-NEXT: ldr s3, [sp, #32]
1175 ; CHECK-GI-NEXT: ldr s1, [sp, #40]
1176 ; CHECK-GI-NEXT: adrp x8, .LCPI53_0
1177 ; CHECK-GI-NEXT: mov v4.s[1], w1
1178 ; CHECK-GI-NEXT: mov v5.s[1], w5
1179 ; CHECK-GI-NEXT: mov v2.s[1], v0.s[0]
1180 ; CHECK-GI-NEXT: mov v3.s[1], v1.s[0]
1181 ; CHECK-GI-NEXT: ldr s0, [sp, #16]
1182 ; CHECK-GI-NEXT: ldr s1, [sp, #48]
1183 ; CHECK-GI-NEXT: ldr q6, [x8, :lo12:.LCPI53_0]
1184 ; CHECK-GI-NEXT: mov v4.s[2], w2
1185 ; CHECK-GI-NEXT: mov v5.s[2], w6
1186 ; CHECK-GI-NEXT: mov v2.s[2], v0.s[0]
1187 ; CHECK-GI-NEXT: mov v3.s[2], v1.s[0]
1188 ; CHECK-GI-NEXT: ldr s0, [sp, #24]
1189 ; CHECK-GI-NEXT: ldr s1, [sp, #56]
1190 ; CHECK-GI-NEXT: mov v4.s[3], w3
1191 ; CHECK-GI-NEXT: mov v5.s[3], w7
1192 ; CHECK-GI-NEXT: mov v2.s[3], v0.s[0]
1193 ; CHECK-GI-NEXT: mov v3.s[3], v1.s[0]
1194 ; CHECK-GI-NEXT: and v0.16b, v4.16b, v6.16b
1195 ; CHECK-GI-NEXT: and v1.16b, v5.16b, v6.16b
1196 ; CHECK-GI-NEXT: and v2.16b, v2.16b, v6.16b
1197 ; CHECK-GI-NEXT: and v3.16b, v3.16b, v6.16b
1198 ; CHECK-GI-NEXT: ret
1200 %c = zext <16 x i10> %a to <16 x i32>
1204 define <16 x i64> @zext_v16i10_v16i64(<16 x i10> %a) {
1205 ; CHECK-SD-LABEL: zext_v16i10_v16i64:
1206 ; CHECK-SD: // %bb.0: // %entry
1207 ; CHECK-SD-NEXT: fmov s0, w2
1208 ; CHECK-SD-NEXT: fmov s1, w0
1209 ; CHECK-SD-NEXT: ldr s2, [sp]
1210 ; CHECK-SD-NEXT: fmov s3, w4
1211 ; CHECK-SD-NEXT: fmov s4, w6
1212 ; CHECK-SD-NEXT: add x9, sp, #8
1213 ; CHECK-SD-NEXT: ldr s5, [sp, #16]
1214 ; CHECK-SD-NEXT: ldr s6, [sp, #32]
1215 ; CHECK-SD-NEXT: ldr s7, [sp, #48]
1216 ; CHECK-SD-NEXT: mov v1.s[1], w1
1217 ; CHECK-SD-NEXT: mov v0.s[1], w3
1218 ; CHECK-SD-NEXT: ld1 { v2.s }[1], [x9]
1219 ; CHECK-SD-NEXT: mov v3.s[1], w5
1220 ; CHECK-SD-NEXT: mov v4.s[1], w7
1221 ; CHECK-SD-NEXT: add x9, sp, #24
1222 ; CHECK-SD-NEXT: add x10, sp, #40
1223 ; CHECK-SD-NEXT: add x11, sp, #56
1224 ; CHECK-SD-NEXT: ld1 { v5.s }[1], [x9]
1225 ; CHECK-SD-NEXT: ld1 { v6.s }[1], [x10]
1226 ; CHECK-SD-NEXT: ld1 { v7.s }[1], [x11]
1227 ; CHECK-SD-NEXT: mov w8, #1023 // =0x3ff
1228 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
1229 ; CHECK-SD-NEXT: dup v16.2d, x8
1230 ; CHECK-SD-NEXT: ushll v17.2d, v0.2s, #0
1231 ; CHECK-SD-NEXT: ushll v3.2d, v3.2s, #0
1232 ; CHECK-SD-NEXT: ushll v4.2d, v4.2s, #0
1233 ; CHECK-SD-NEXT: ushll v18.2d, v2.2s, #0
1234 ; CHECK-SD-NEXT: ushll v5.2d, v5.2s, #0
1235 ; CHECK-SD-NEXT: ushll v6.2d, v6.2s, #0
1236 ; CHECK-SD-NEXT: ushll v7.2d, v7.2s, #0
1237 ; CHECK-SD-NEXT: and v0.16b, v1.16b, v16.16b
1238 ; CHECK-SD-NEXT: and v1.16b, v17.16b, v16.16b
1239 ; CHECK-SD-NEXT: and v2.16b, v3.16b, v16.16b
1240 ; CHECK-SD-NEXT: and v3.16b, v4.16b, v16.16b
1241 ; CHECK-SD-NEXT: and v4.16b, v18.16b, v16.16b
1242 ; CHECK-SD-NEXT: and v5.16b, v5.16b, v16.16b
1243 ; CHECK-SD-NEXT: and v6.16b, v6.16b, v16.16b
1244 ; CHECK-SD-NEXT: and v7.16b, v7.16b, v16.16b
1245 ; CHECK-SD-NEXT: ret
1247 ; CHECK-GI-LABEL: zext_v16i10_v16i64:
1248 ; CHECK-GI: // %bb.0: // %entry
1249 ; CHECK-GI-NEXT: fmov s7, w0
1250 ; CHECK-GI-NEXT: fmov s17, w2
1251 ; CHECK-GI-NEXT: ldr s0, [sp]
1252 ; CHECK-GI-NEXT: fmov s18, w4
1253 ; CHECK-GI-NEXT: fmov s19, w6
1254 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1255 ; CHECK-GI-NEXT: ldr s2, [sp, #16]
1256 ; CHECK-GI-NEXT: ldr s3, [sp, #24]
1257 ; CHECK-GI-NEXT: ldr s4, [sp, #32]
1258 ; CHECK-GI-NEXT: ldr s5, [sp, #40]
1259 ; CHECK-GI-NEXT: ldr s6, [sp, #48]
1260 ; CHECK-GI-NEXT: ldr s16, [sp, #56]
1261 ; CHECK-GI-NEXT: mov v7.s[1], w1
1262 ; CHECK-GI-NEXT: mov v17.s[1], w3
1263 ; CHECK-GI-NEXT: mov v18.s[1], w5
1264 ; CHECK-GI-NEXT: mov v19.s[1], w7
1265 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1266 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1267 ; CHECK-GI-NEXT: mov v4.s[1], v5.s[0]
1268 ; CHECK-GI-NEXT: mov v6.s[1], v16.s[0]
1269 ; CHECK-GI-NEXT: adrp x8, .LCPI54_0
1270 ; CHECK-GI-NEXT: ldr q16, [x8, :lo12:.LCPI54_0]
1271 ; CHECK-GI-NEXT: ushll v1.2d, v7.2s, #0
1272 ; CHECK-GI-NEXT: ushll v3.2d, v17.2s, #0
1273 ; CHECK-GI-NEXT: ushll v5.2d, v18.2s, #0
1274 ; CHECK-GI-NEXT: ushll v7.2d, v19.2s, #0
1275 ; CHECK-GI-NEXT: ushll v17.2d, v0.2s, #0
1276 ; CHECK-GI-NEXT: ushll v18.2d, v2.2s, #0
1277 ; CHECK-GI-NEXT: ushll v19.2d, v4.2s, #0
1278 ; CHECK-GI-NEXT: ushll v20.2d, v6.2s, #0
1279 ; CHECK-GI-NEXT: and v0.16b, v1.16b, v16.16b
1280 ; CHECK-GI-NEXT: and v1.16b, v3.16b, v16.16b
1281 ; CHECK-GI-NEXT: and v2.16b, v5.16b, v16.16b
1282 ; CHECK-GI-NEXT: and v3.16b, v7.16b, v16.16b
1283 ; CHECK-GI-NEXT: and v4.16b, v17.16b, v16.16b
1284 ; CHECK-GI-NEXT: and v5.16b, v18.16b, v16.16b
1285 ; CHECK-GI-NEXT: and v6.16b, v19.16b, v16.16b
1286 ; CHECK-GI-NEXT: and v7.16b, v20.16b, v16.16b
1287 ; CHECK-GI-NEXT: ret
1289 %c = zext <16 x i10> %a to <16 x i64>