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 define i16 @sext_i8_to_i16(i8 %a) {
6 ; CHECK-LABEL: sext_i8_to_i16:
7 ; CHECK: // %bb.0: // %entry
8 ; CHECK-NEXT: sxtb w0, w0
11 %c = sext i8 %a to i16
15 define i32 @sext_i8_to_i32(i8 %a) {
16 ; CHECK-LABEL: sext_i8_to_i32:
17 ; CHECK: // %bb.0: // %entry
18 ; CHECK-NEXT: sxtb w0, w0
21 %c = sext i8 %a to i32
25 define i64 @sext_i8_to_i64(i8 %a) {
26 ; CHECK-LABEL: sext_i8_to_i64:
27 ; CHECK: // %bb.0: // %entry
28 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
29 ; CHECK-NEXT: sxtb x0, w0
32 %c = sext i8 %a to i64
36 define i10 @sext_i8_to_i10(i8 %a) {
37 ; CHECK-LABEL: sext_i8_to_i10:
38 ; CHECK: // %bb.0: // %entry
39 ; CHECK-NEXT: sxtb w0, w0
42 %c = sext i8 %a to i10
46 define i32 @sext_i16_to_i32(i16 %a) {
47 ; CHECK-LABEL: sext_i16_to_i32:
48 ; CHECK: // %bb.0: // %entry
49 ; CHECK-NEXT: sxth w0, w0
52 %c = sext i16 %a to i32
56 define i64 @sext_i16_to_i64(i16 %a) {
57 ; CHECK-LABEL: sext_i16_to_i64:
58 ; CHECK: // %bb.0: // %entry
59 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
60 ; CHECK-NEXT: sxth x0, w0
63 %c = sext i16 %a to i64
67 define i64 @sext_i32_to_i64(i32 %a) {
68 ; CHECK-LABEL: sext_i32_to_i64:
69 ; CHECK: // %bb.0: // %entry
70 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
71 ; CHECK-NEXT: sxtw x0, w0
74 %c = sext i32 %a to i64
78 define i16 @sext_i10_to_i16(i10 %a) {
79 ; CHECK-LABEL: sext_i10_to_i16:
80 ; CHECK: // %bb.0: // %entry
81 ; CHECK-NEXT: sbfx w0, w0, #0, #10
84 %c = sext i10 %a to i16
88 define i32 @sext_i10_to_i32(i10 %a) {
89 ; CHECK-LABEL: sext_i10_to_i32:
90 ; CHECK: // %bb.0: // %entry
91 ; CHECK-NEXT: sbfx w0, w0, #0, #10
94 %c = sext i10 %a to i32
98 define i64 @sext_i10_to_i64(i10 %a) {
99 ; CHECK-LABEL: sext_i10_to_i64:
100 ; CHECK: // %bb.0: // %entry
101 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
102 ; CHECK-NEXT: sbfx x0, x0, #0, #10
105 %c = sext i10 %a to i64
109 define <2 x i16> @sext_v2i8_v2i16(<2 x i8> %a) {
110 ; CHECK-LABEL: sext_v2i8_v2i16:
111 ; CHECK: // %bb.0: // %entry
112 ; CHECK-NEXT: shl v0.2s, v0.2s, #24
113 ; CHECK-NEXT: sshr v0.2s, v0.2s, #24
116 %c = sext <2 x i8> %a to <2 x i16>
120 define <2 x i32> @sext_v2i8_v2i32(<2 x i8> %a) {
121 ; CHECK-LABEL: sext_v2i8_v2i32:
122 ; CHECK: // %bb.0: // %entry
123 ; CHECK-NEXT: shl v0.2s, v0.2s, #24
124 ; CHECK-NEXT: sshr v0.2s, v0.2s, #24
127 %c = sext <2 x i8> %a to <2 x i32>
131 define <2 x i64> @sext_v2i8_v2i64(<2 x i8> %a) {
132 ; CHECK-LABEL: sext_v2i8_v2i64:
133 ; CHECK: // %bb.0: // %entry
134 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
135 ; CHECK-NEXT: shl v0.2d, v0.2d, #56
136 ; CHECK-NEXT: sshr v0.2d, v0.2d, #56
139 %c = sext <2 x i8> %a to <2 x i64>
143 define <2 x i32> @sext_v2i16_v2i32(<2 x i16> %a) {
144 ; CHECK-LABEL: sext_v2i16_v2i32:
145 ; CHECK: // %bb.0: // %entry
146 ; CHECK-NEXT: shl v0.2s, v0.2s, #16
147 ; CHECK-NEXT: sshr v0.2s, v0.2s, #16
150 %c = sext <2 x i16> %a to <2 x i32>
154 define <2 x i64> @sext_v2i16_v2i64(<2 x i16> %a) {
155 ; CHECK-LABEL: sext_v2i16_v2i64:
156 ; CHECK: // %bb.0: // %entry
157 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
158 ; CHECK-NEXT: shl v0.2d, v0.2d, #48
159 ; CHECK-NEXT: sshr v0.2d, v0.2d, #48
162 %c = sext <2 x i16> %a to <2 x i64>
166 define <2 x i64> @sext_v2i32_v2i64(<2 x i32> %a) {
167 ; CHECK-LABEL: sext_v2i32_v2i64:
168 ; CHECK: // %bb.0: // %entry
169 ; CHECK-NEXT: sshll v0.2d, v0.2s, #0
172 %c = sext <2 x i32> %a to <2 x i64>
176 define <2 x i16> @sext_v2i10_v2i16(<2 x i10> %a) {
177 ; CHECK-LABEL: sext_v2i10_v2i16:
178 ; CHECK: // %bb.0: // %entry
179 ; CHECK-NEXT: shl v0.2s, v0.2s, #22
180 ; CHECK-NEXT: sshr v0.2s, v0.2s, #22
183 %c = sext <2 x i10> %a to <2 x i16>
187 define <2 x i32> @sext_v2i10_v2i32(<2 x i10> %a) {
188 ; CHECK-LABEL: sext_v2i10_v2i32:
189 ; CHECK: // %bb.0: // %entry
190 ; CHECK-NEXT: shl v0.2s, v0.2s, #22
191 ; CHECK-NEXT: sshr v0.2s, v0.2s, #22
194 %c = sext <2 x i10> %a to <2 x i32>
198 define <2 x i64> @sext_v2i10_v2i64(<2 x i10> %a) {
199 ; CHECK-LABEL: sext_v2i10_v2i64:
200 ; CHECK: // %bb.0: // %entry
201 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
202 ; CHECK-NEXT: shl v0.2d, v0.2d, #54
203 ; CHECK-NEXT: sshr v0.2d, v0.2d, #54
206 %c = sext <2 x i10> %a to <2 x i64>
210 define <3 x i16> @sext_v3i8_v3i16(<3 x i8> %a) {
211 ; CHECK-SD-LABEL: sext_v3i8_v3i16:
212 ; CHECK-SD: // %bb.0: // %entry
213 ; CHECK-SD-NEXT: fmov s0, w0
214 ; CHECK-SD-NEXT: mov v0.h[1], w1
215 ; CHECK-SD-NEXT: mov v0.h[2], w2
216 ; CHECK-SD-NEXT: shl v0.4h, v0.4h, #8
217 ; CHECK-SD-NEXT: sshr v0.4h, v0.4h, #8
220 ; CHECK-GI-LABEL: sext_v3i8_v3i16:
221 ; CHECK-GI: // %bb.0: // %entry
222 ; CHECK-GI-NEXT: fmov s0, w0
223 ; CHECK-GI-NEXT: mov v0.s[1], w1
224 ; CHECK-GI-NEXT: mov v0.s[2], w2
225 ; CHECK-GI-NEXT: xtn v0.4h, v0.4s
226 ; CHECK-GI-NEXT: shl v0.4h, v0.4h, #8
227 ; CHECK-GI-NEXT: sshr v0.4h, v0.4h, #8
230 %c = sext <3 x i8> %a to <3 x i16>
234 define <3 x i32> @sext_v3i8_v3i32(<3 x i8> %a) {
235 ; CHECK-SD-LABEL: sext_v3i8_v3i32:
236 ; CHECK-SD: // %bb.0: // %entry
237 ; CHECK-SD-NEXT: fmov s0, w0
238 ; CHECK-SD-NEXT: mov v0.h[1], w1
239 ; CHECK-SD-NEXT: mov v0.h[2], w2
240 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
241 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #24
242 ; CHECK-SD-NEXT: sshr v0.4s, v0.4s, #24
245 ; CHECK-GI-LABEL: sext_v3i8_v3i32:
246 ; CHECK-GI: // %bb.0: // %entry
247 ; CHECK-GI-NEXT: mov w8, #24 // =0x18
248 ; CHECK-GI-NEXT: fmov s0, w0
249 ; CHECK-GI-NEXT: fmov s1, w8
250 ; CHECK-GI-NEXT: mov v0.s[1], w1
251 ; CHECK-GI-NEXT: mov v1.s[1], w8
252 ; CHECK-GI-NEXT: mov v0.s[2], w2
253 ; CHECK-GI-NEXT: mov v1.s[2], w8
254 ; CHECK-GI-NEXT: ushl v0.4s, v0.4s, v1.4s
255 ; CHECK-GI-NEXT: neg v1.4s, v1.4s
256 ; CHECK-GI-NEXT: sshl v0.4s, v0.4s, v1.4s
259 %c = sext <3 x i8> %a to <3 x i32>
263 define <3 x i64> @sext_v3i8_v3i64(<3 x i8> %a) {
264 ; CHECK-SD-LABEL: sext_v3i8_v3i64:
265 ; CHECK-SD: // %bb.0: // %entry
266 ; CHECK-SD-NEXT: fmov s0, w0
267 ; CHECK-SD-NEXT: fmov s1, w2
268 ; CHECK-SD-NEXT: mov v0.s[1], w1
269 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
270 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #56
271 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
272 ; CHECK-SD-NEXT: sshr v2.2d, v2.2d, #56
273 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #56
274 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
275 ; CHECK-SD-NEXT: sshr v0.2d, v0.2d, #56
276 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
277 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
278 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
281 ; CHECK-GI-LABEL: sext_v3i8_v3i64:
282 ; CHECK-GI: // %bb.0: // %entry
283 ; CHECK-GI-NEXT: fmov s0, w0
284 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
285 ; CHECK-GI-NEXT: sxtb x8, w2
286 ; CHECK-GI-NEXT: fmov d2, x8
287 ; CHECK-GI-NEXT: mov v0.s[1], w1
288 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
289 ; CHECK-GI-NEXT: shl v0.2d, v0.2d, #56
290 ; CHECK-GI-NEXT: sshr v0.2d, v0.2d, #56
291 ; CHECK-GI-NEXT: mov d1, v0.d[1]
292 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
295 %c = sext <3 x i8> %a to <3 x i64>
299 define <3 x i32> @sext_v3i16_v3i32(<3 x i16> %a) {
300 ; CHECK-SD-LABEL: sext_v3i16_v3i32:
301 ; CHECK-SD: // %bb.0: // %entry
302 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
305 ; CHECK-GI-LABEL: sext_v3i16_v3i32:
306 ; CHECK-GI: // %bb.0: // %entry
307 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
308 ; CHECK-GI-NEXT: smov w8, v0.h[0]
309 ; CHECK-GI-NEXT: smov w9, v0.h[1]
310 ; CHECK-GI-NEXT: fmov s1, w8
311 ; CHECK-GI-NEXT: smov w8, v0.h[2]
312 ; CHECK-GI-NEXT: mov v1.s[1], w9
313 ; CHECK-GI-NEXT: mov v1.s[2], w8
314 ; CHECK-GI-NEXT: mov v0.16b, v1.16b
317 %c = sext <3 x i16> %a to <3 x i32>
321 define <3 x i64> @sext_v3i16_v3i64(<3 x i16> %a) {
322 ; CHECK-SD-LABEL: sext_v3i16_v3i64:
323 ; CHECK-SD: // %bb.0: // %entry
324 ; CHECK-SD-NEXT: sshll v2.4s, v0.4h, #0
325 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
326 ; CHECK-SD-NEXT: sshll2 v2.2d, v2.4s, #0
327 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
328 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
329 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
330 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
333 ; CHECK-GI-LABEL: sext_v3i16_v3i64:
334 ; CHECK-GI: // %bb.0: // %entry
335 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
336 ; CHECK-GI-NEXT: smov x8, v0.h[0]
337 ; CHECK-GI-NEXT: smov x9, v0.h[1]
338 ; CHECK-GI-NEXT: smov x10, v0.h[2]
339 ; CHECK-GI-NEXT: fmov d0, x8
340 ; CHECK-GI-NEXT: fmov d1, x9
341 ; CHECK-GI-NEXT: fmov d2, x10
344 %c = sext <3 x i16> %a to <3 x i64>
348 define <3 x i64> @sext_v3i32_v3i64(<3 x i32> %a) {
349 ; CHECK-SD-LABEL: sext_v3i32_v3i64:
350 ; CHECK-SD: // %bb.0: // %entry
351 ; CHECK-SD-NEXT: sshll v3.2d, v0.2s, #0
352 ; CHECK-SD-NEXT: sshll2 v2.2d, v0.4s, #0
353 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
354 ; CHECK-SD-NEXT: fmov d0, d3
355 ; CHECK-SD-NEXT: ext v1.16b, v3.16b, v3.16b, #8
356 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
359 ; CHECK-GI-LABEL: sext_v3i32_v3i64:
360 ; CHECK-GI: // %bb.0: // %entry
361 ; CHECK-GI-NEXT: smov x8, v0.s[0]
362 ; CHECK-GI-NEXT: smov x9, v0.s[1]
363 ; CHECK-GI-NEXT: smov x10, v0.s[2]
364 ; CHECK-GI-NEXT: fmov d0, x8
365 ; CHECK-GI-NEXT: fmov d1, x9
366 ; CHECK-GI-NEXT: fmov d2, x10
369 %c = sext <3 x i32> %a to <3 x i64>
373 define <3 x i16> @sext_v3i10_v3i16(<3 x i10> %a) {
374 ; CHECK-SD-LABEL: sext_v3i10_v3i16:
375 ; CHECK-SD: // %bb.0: // %entry
376 ; CHECK-SD-NEXT: fmov s0, w0
377 ; CHECK-SD-NEXT: mov v0.h[1], w1
378 ; CHECK-SD-NEXT: mov v0.h[2], w2
379 ; CHECK-SD-NEXT: shl v0.4h, v0.4h, #6
380 ; CHECK-SD-NEXT: sshr v0.4h, v0.4h, #6
383 ; CHECK-GI-LABEL: sext_v3i10_v3i16:
384 ; CHECK-GI: // %bb.0: // %entry
385 ; CHECK-GI-NEXT: fmov s0, w0
386 ; CHECK-GI-NEXT: mov v0.s[1], w1
387 ; CHECK-GI-NEXT: mov v0.s[2], w2
388 ; CHECK-GI-NEXT: xtn v0.4h, v0.4s
389 ; CHECK-GI-NEXT: shl v0.4h, v0.4h, #6
390 ; CHECK-GI-NEXT: sshr v0.4h, v0.4h, #6
393 %c = sext <3 x i10> %a to <3 x i16>
397 define <3 x i32> @sext_v3i10_v3i32(<3 x i10> %a) {
398 ; CHECK-SD-LABEL: sext_v3i10_v3i32:
399 ; CHECK-SD: // %bb.0: // %entry
400 ; CHECK-SD-NEXT: fmov s0, w0
401 ; CHECK-SD-NEXT: mov v0.h[1], w1
402 ; CHECK-SD-NEXT: mov v0.h[2], w2
403 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
404 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #22
405 ; CHECK-SD-NEXT: sshr v0.4s, v0.4s, #22
408 ; CHECK-GI-LABEL: sext_v3i10_v3i32:
409 ; CHECK-GI: // %bb.0: // %entry
410 ; CHECK-GI-NEXT: mov w8, #22 // =0x16
411 ; CHECK-GI-NEXT: fmov s0, w0
412 ; CHECK-GI-NEXT: fmov s1, w8
413 ; CHECK-GI-NEXT: mov v0.s[1], w1
414 ; CHECK-GI-NEXT: mov v1.s[1], w8
415 ; CHECK-GI-NEXT: mov v0.s[2], w2
416 ; CHECK-GI-NEXT: mov v1.s[2], w8
417 ; CHECK-GI-NEXT: ushl v0.4s, v0.4s, v1.4s
418 ; CHECK-GI-NEXT: neg v1.4s, v1.4s
419 ; CHECK-GI-NEXT: sshl v0.4s, v0.4s, v1.4s
422 %c = sext <3 x i10> %a to <3 x i32>
426 define <3 x i64> @sext_v3i10_v3i64(<3 x i10> %a) {
427 ; CHECK-SD-LABEL: sext_v3i10_v3i64:
428 ; CHECK-SD: // %bb.0: // %entry
429 ; CHECK-SD-NEXT: fmov s0, w0
430 ; CHECK-SD-NEXT: fmov s1, w2
431 ; CHECK-SD-NEXT: mov v0.s[1], w1
432 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
433 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #54
434 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
435 ; CHECK-SD-NEXT: sshr v2.2d, v2.2d, #54
436 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #54
437 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
438 ; CHECK-SD-NEXT: sshr v0.2d, v0.2d, #54
439 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
440 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
441 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
444 ; CHECK-GI-LABEL: sext_v3i10_v3i64:
445 ; CHECK-GI: // %bb.0: // %entry
446 ; CHECK-GI-NEXT: fmov s0, w0
447 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
448 ; CHECK-GI-NEXT: sbfx x8, x2, #0, #10
449 ; CHECK-GI-NEXT: fmov d2, x8
450 ; CHECK-GI-NEXT: mov v0.s[1], w1
451 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
452 ; CHECK-GI-NEXT: shl v0.2d, v0.2d, #54
453 ; CHECK-GI-NEXT: sshr v0.2d, v0.2d, #54
454 ; CHECK-GI-NEXT: mov d1, v0.d[1]
455 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
458 %c = sext <3 x i10> %a to <3 x i64>
462 define <4 x i16> @sext_v4i8_v4i16(<4 x i8> %a) {
463 ; CHECK-LABEL: sext_v4i8_v4i16:
464 ; CHECK: // %bb.0: // %entry
465 ; CHECK-NEXT: shl v0.4h, v0.4h, #8
466 ; CHECK-NEXT: sshr v0.4h, v0.4h, #8
469 %c = sext <4 x i8> %a to <4 x i16>
473 define <4 x i32> @sext_v4i8_v4i32(<4 x i8> %a) {
474 ; CHECK-LABEL: sext_v4i8_v4i32:
475 ; CHECK: // %bb.0: // %entry
476 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
477 ; CHECK-NEXT: shl v0.4s, v0.4s, #24
478 ; CHECK-NEXT: sshr v0.4s, v0.4s, #24
481 %c = sext <4 x i8> %a to <4 x i32>
485 define <4 x i64> @sext_v4i8_v4i64(<4 x i8> %a) {
486 ; CHECK-SD-LABEL: sext_v4i8_v4i64:
487 ; CHECK-SD: // %bb.0: // %entry
488 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
489 ; CHECK-SD-NEXT: ushll v1.2d, v0.2s, #0
490 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
491 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #56
492 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #56
493 ; CHECK-SD-NEXT: sshr v1.2d, v0.2d, #56
494 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #56
497 ; CHECK-GI-LABEL: sext_v4i8_v4i64:
498 ; CHECK-GI: // %bb.0: // %entry
499 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
500 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
501 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
502 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #56
503 ; CHECK-GI-NEXT: shl v2.2d, v0.2d, #56
504 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #56
505 ; CHECK-GI-NEXT: sshr v1.2d, v2.2d, #56
508 %c = sext <4 x i8> %a to <4 x i64>
512 define <4 x i32> @sext_v4i16_v4i32(<4 x i16> %a) {
513 ; CHECK-LABEL: sext_v4i16_v4i32:
514 ; CHECK: // %bb.0: // %entry
515 ; CHECK-NEXT: sshll v0.4s, v0.4h, #0
518 %c = sext <4 x i16> %a to <4 x i32>
522 define <4 x i64> @sext_v4i16_v4i64(<4 x i16> %a) {
523 ; CHECK-SD-LABEL: sext_v4i16_v4i64:
524 ; CHECK-SD: // %bb.0: // %entry
525 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
526 ; CHECK-SD-NEXT: sshll2 v1.2d, v0.4s, #0
527 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
530 ; CHECK-GI-LABEL: sext_v4i16_v4i64:
531 ; CHECK-GI: // %bb.0: // %entry
532 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
533 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
534 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
537 %c = sext <4 x i16> %a to <4 x i64>
541 define <4 x i64> @sext_v4i32_v4i64(<4 x i32> %a) {
542 ; CHECK-SD-LABEL: sext_v4i32_v4i64:
543 ; CHECK-SD: // %bb.0: // %entry
544 ; CHECK-SD-NEXT: sshll2 v1.2d, v0.4s, #0
545 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
548 ; CHECK-GI-LABEL: sext_v4i32_v4i64:
549 ; CHECK-GI: // %bb.0: // %entry
550 ; CHECK-GI-NEXT: sshll v2.2d, v0.2s, #0
551 ; CHECK-GI-NEXT: sshll2 v1.2d, v0.4s, #0
552 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
555 %c = sext <4 x i32> %a to <4 x i64>
559 define <4 x i16> @sext_v4i10_v4i16(<4 x i10> %a) {
560 ; CHECK-LABEL: sext_v4i10_v4i16:
561 ; CHECK: // %bb.0: // %entry
562 ; CHECK-NEXT: shl v0.4h, v0.4h, #6
563 ; CHECK-NEXT: sshr v0.4h, v0.4h, #6
566 %c = sext <4 x i10> %a to <4 x i16>
570 define <4 x i32> @sext_v4i10_v4i32(<4 x i10> %a) {
571 ; CHECK-LABEL: sext_v4i10_v4i32:
572 ; CHECK: // %bb.0: // %entry
573 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
574 ; CHECK-NEXT: shl v0.4s, v0.4s, #22
575 ; CHECK-NEXT: sshr v0.4s, v0.4s, #22
578 %c = sext <4 x i10> %a to <4 x i32>
582 define <4 x i64> @sext_v4i10_v4i64(<4 x i10> %a) {
583 ; CHECK-SD-LABEL: sext_v4i10_v4i64:
584 ; CHECK-SD: // %bb.0: // %entry
585 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
586 ; CHECK-SD-NEXT: ushll v1.2d, v0.2s, #0
587 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
588 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #54
589 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #54
590 ; CHECK-SD-NEXT: sshr v1.2d, v0.2d, #54
591 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #54
594 ; CHECK-GI-LABEL: sext_v4i10_v4i64:
595 ; CHECK-GI: // %bb.0: // %entry
596 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
597 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
598 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
599 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
600 ; CHECK-GI-NEXT: shl v2.2d, v0.2d, #54
601 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #54
602 ; CHECK-GI-NEXT: sshr v1.2d, v2.2d, #54
605 %c = sext <4 x i10> %a to <4 x i64>
609 define <8 x i16> @sext_v8i8_v8i16(<8 x i8> %a) {
610 ; CHECK-LABEL: sext_v8i8_v8i16:
611 ; CHECK: // %bb.0: // %entry
612 ; CHECK-NEXT: sshll v0.8h, v0.8b, #0
615 %c = sext <8 x i8> %a to <8 x i16>
619 define <8 x i32> @sext_v8i8_v8i32(<8 x i8> %a) {
620 ; CHECK-SD-LABEL: sext_v8i8_v8i32:
621 ; CHECK-SD: // %bb.0: // %entry
622 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
623 ; CHECK-SD-NEXT: sshll2 v1.4s, v0.8h, #0
624 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
627 ; CHECK-GI-LABEL: sext_v8i8_v8i32:
628 ; CHECK-GI: // %bb.0: // %entry
629 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
630 ; CHECK-GI-NEXT: sshll v0.4s, v1.4h, #0
631 ; CHECK-GI-NEXT: sshll2 v1.4s, v1.8h, #0
634 %c = sext <8 x i8> %a to <8 x i32>
638 define <8 x i64> @sext_v8i8_v8i64(<8 x i8> %a) {
639 ; CHECK-SD-LABEL: sext_v8i8_v8i64:
640 ; CHECK-SD: // %bb.0: // %entry
641 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
642 ; CHECK-SD-NEXT: sshll v1.4s, v0.4h, #0
643 ; CHECK-SD-NEXT: sshll2 v2.4s, v0.8h, #0
644 ; CHECK-SD-NEXT: sshll v0.2d, v1.2s, #0
645 ; CHECK-SD-NEXT: sshll2 v3.2d, v2.4s, #0
646 ; CHECK-SD-NEXT: sshll2 v1.2d, v1.4s, #0
647 ; CHECK-SD-NEXT: sshll v2.2d, v2.2s, #0
650 ; CHECK-GI-LABEL: sext_v8i8_v8i64:
651 ; CHECK-GI: // %bb.0: // %entry
652 ; CHECK-GI-NEXT: sshll v0.8h, v0.8b, #0
653 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
654 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
655 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
656 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
657 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
658 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
661 %c = sext <8 x i8> %a to <8 x i64>
665 define <8 x i32> @sext_v8i16_v8i32(<8 x i16> %a) {
666 ; CHECK-SD-LABEL: sext_v8i16_v8i32:
667 ; CHECK-SD: // %bb.0: // %entry
668 ; CHECK-SD-NEXT: sshll2 v1.4s, v0.8h, #0
669 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
672 ; CHECK-GI-LABEL: sext_v8i16_v8i32:
673 ; CHECK-GI: // %bb.0: // %entry
674 ; CHECK-GI-NEXT: sshll v2.4s, v0.4h, #0
675 ; CHECK-GI-NEXT: sshll2 v1.4s, v0.8h, #0
676 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
679 %c = sext <8 x i16> %a to <8 x i32>
683 define <8 x i64> @sext_v8i16_v8i64(<8 x i16> %a) {
684 ; CHECK-SD-LABEL: sext_v8i16_v8i64:
685 ; CHECK-SD: // %bb.0: // %entry
686 ; CHECK-SD-NEXT: sshll v1.4s, v0.4h, #0
687 ; CHECK-SD-NEXT: sshll2 v2.4s, v0.8h, #0
688 ; CHECK-SD-NEXT: sshll v0.2d, v1.2s, #0
689 ; CHECK-SD-NEXT: sshll2 v3.2d, v2.4s, #0
690 ; CHECK-SD-NEXT: sshll2 v1.2d, v1.4s, #0
691 ; CHECK-SD-NEXT: sshll v2.2d, v2.2s, #0
694 ; CHECK-GI-LABEL: sext_v8i16_v8i64:
695 ; CHECK-GI: // %bb.0: // %entry
696 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
697 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
698 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
699 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
700 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
701 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
704 %c = sext <8 x i16> %a to <8 x i64>
708 define <8 x i64> @sext_v8i32_v8i64(<8 x i32> %a) {
709 ; CHECK-SD-LABEL: sext_v8i32_v8i64:
710 ; CHECK-SD: // %bb.0: // %entry
711 ; CHECK-SD-NEXT: sshll v5.2d, v0.2s, #0
712 ; CHECK-SD-NEXT: sshll2 v4.2d, v0.4s, #0
713 ; CHECK-SD-NEXT: sshll2 v3.2d, v1.4s, #0
714 ; CHECK-SD-NEXT: sshll v2.2d, v1.2s, #0
715 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
716 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
719 ; CHECK-GI-LABEL: sext_v8i32_v8i64:
720 ; CHECK-GI: // %bb.0: // %entry
721 ; CHECK-GI-NEXT: sshll v4.2d, v0.2s, #0
722 ; CHECK-GI-NEXT: sshll2 v5.2d, v0.4s, #0
723 ; CHECK-GI-NEXT: sshll v2.2d, v1.2s, #0
724 ; CHECK-GI-NEXT: sshll2 v3.2d, v1.4s, #0
725 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
726 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
729 %c = sext <8 x i32> %a to <8 x i64>
733 define <8 x i16> @sext_v8i10_v8i16(<8 x i10> %a) {
734 ; CHECK-LABEL: sext_v8i10_v8i16:
735 ; CHECK: // %bb.0: // %entry
736 ; CHECK-NEXT: shl v0.8h, v0.8h, #6
737 ; CHECK-NEXT: sshr v0.8h, v0.8h, #6
740 %c = sext <8 x i10> %a to <8 x i16>
744 define <8 x i32> @sext_v8i10_v8i32(<8 x i10> %a) {
745 ; CHECK-SD-LABEL: sext_v8i10_v8i32:
746 ; CHECK-SD: // %bb.0: // %entry
747 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
748 ; CHECK-SD-NEXT: ushll2 v0.4s, v0.8h, #0
749 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #22
750 ; CHECK-SD-NEXT: shl v2.4s, v1.4s, #22
751 ; CHECK-SD-NEXT: sshr v1.4s, v0.4s, #22
752 ; CHECK-SD-NEXT: sshr v0.4s, v2.4s, #22
755 ; CHECK-GI-LABEL: sext_v8i10_v8i32:
756 ; CHECK-GI: // %bb.0: // %entry
757 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
758 ; CHECK-GI-NEXT: ushll2 v0.4s, v0.8h, #0
759 ; CHECK-GI-NEXT: shl v1.4s, v1.4s, #22
760 ; CHECK-GI-NEXT: shl v2.4s, v0.4s, #22
761 ; CHECK-GI-NEXT: sshr v0.4s, v1.4s, #22
762 ; CHECK-GI-NEXT: sshr v1.4s, v2.4s, #22
765 %c = sext <8 x i10> %a to <8 x i32>
769 define <8 x i64> @sext_v8i10_v8i64(<8 x i10> %a) {
770 ; CHECK-SD-LABEL: sext_v8i10_v8i64:
771 ; CHECK-SD: // %bb.0: // %entry
772 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
773 ; CHECK-SD-NEXT: ushll2 v0.4s, v0.8h, #0
774 ; CHECK-SD-NEXT: ushll v2.2d, v1.2s, #0
775 ; CHECK-SD-NEXT: ushll v3.2d, v0.2s, #0
776 ; CHECK-SD-NEXT: ushll2 v1.2d, v1.4s, #0
777 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
778 ; CHECK-SD-NEXT: shl v2.2d, v2.2d, #54
779 ; CHECK-SD-NEXT: shl v1.2d, v1.2d, #54
780 ; CHECK-SD-NEXT: shl v5.2d, v3.2d, #54
781 ; CHECK-SD-NEXT: shl v4.2d, v0.2d, #54
782 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #54
783 ; CHECK-SD-NEXT: sshr v1.2d, v1.2d, #54
784 ; CHECK-SD-NEXT: sshr v2.2d, v5.2d, #54
785 ; CHECK-SD-NEXT: sshr v3.2d, v4.2d, #54
788 ; CHECK-GI-LABEL: sext_v8i10_v8i64:
789 ; CHECK-GI: // %bb.0: // %entry
790 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
791 ; CHECK-GI-NEXT: ushll2 v0.4s, v0.8h, #0
792 ; CHECK-GI-NEXT: ushll v2.2d, v1.2s, #0
793 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
794 ; CHECK-GI-NEXT: ushll v3.2d, v0.2s, #0
795 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
796 ; CHECK-GI-NEXT: shl v2.2d, v2.2d, #54
797 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
798 ; CHECK-GI-NEXT: shl v3.2d, v3.2d, #54
799 ; CHECK-GI-NEXT: shl v4.2d, v0.2d, #54
800 ; CHECK-GI-NEXT: sshr v0.2d, v2.2d, #54
801 ; CHECK-GI-NEXT: sshr v1.2d, v1.2d, #54
802 ; CHECK-GI-NEXT: sshr v2.2d, v3.2d, #54
803 ; CHECK-GI-NEXT: sshr v3.2d, v4.2d, #54
806 %c = sext <8 x i10> %a to <8 x i64>
810 define <16 x i16> @sext_v16i8_v16i16(<16 x i8> %a) {
811 ; CHECK-SD-LABEL: sext_v16i8_v16i16:
812 ; CHECK-SD: // %bb.0: // %entry
813 ; CHECK-SD-NEXT: sshll2 v1.8h, v0.16b, #0
814 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
817 ; CHECK-GI-LABEL: sext_v16i8_v16i16:
818 ; CHECK-GI: // %bb.0: // %entry
819 ; CHECK-GI-NEXT: sshll v2.8h, v0.8b, #0
820 ; CHECK-GI-NEXT: sshll2 v1.8h, v0.16b, #0
821 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
824 %c = sext <16 x i8> %a to <16 x i16>
828 define <16 x i32> @sext_v16i8_v16i32(<16 x i8> %a) {
829 ; CHECK-SD-LABEL: sext_v16i8_v16i32:
830 ; CHECK-SD: // %bb.0: // %entry
831 ; CHECK-SD-NEXT: sshll v1.8h, v0.8b, #0
832 ; CHECK-SD-NEXT: sshll2 v2.8h, v0.16b, #0
833 ; CHECK-SD-NEXT: sshll v0.4s, v1.4h, #0
834 ; CHECK-SD-NEXT: sshll2 v3.4s, v2.8h, #0
835 ; CHECK-SD-NEXT: sshll2 v1.4s, v1.8h, #0
836 ; CHECK-SD-NEXT: sshll v2.4s, v2.4h, #0
839 ; CHECK-GI-LABEL: sext_v16i8_v16i32:
840 ; CHECK-GI: // %bb.0: // %entry
841 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
842 ; CHECK-GI-NEXT: sshll2 v3.8h, v0.16b, #0
843 ; CHECK-GI-NEXT: sshll v0.4s, v1.4h, #0
844 ; CHECK-GI-NEXT: sshll2 v1.4s, v1.8h, #0
845 ; CHECK-GI-NEXT: sshll v2.4s, v3.4h, #0
846 ; CHECK-GI-NEXT: sshll2 v3.4s, v3.8h, #0
849 %c = sext <16 x i8> %a to <16 x i32>
853 define <16 x i64> @sext_v16i8_v16i64(<16 x i8> %a) {
854 ; CHECK-SD-LABEL: sext_v16i8_v16i64:
855 ; CHECK-SD: // %bb.0: // %entry
856 ; CHECK-SD-NEXT: sshll v1.8h, v0.8b, #0
857 ; CHECK-SD-NEXT: sshll2 v0.8h, v0.16b, #0
858 ; CHECK-SD-NEXT: sshll v2.4s, v1.4h, #0
859 ; CHECK-SD-NEXT: sshll2 v4.4s, v1.8h, #0
860 ; CHECK-SD-NEXT: sshll v5.4s, v0.4h, #0
861 ; CHECK-SD-NEXT: sshll2 v6.4s, v0.8h, #0
862 ; CHECK-SD-NEXT: sshll2 v1.2d, v2.4s, #0
863 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
864 ; CHECK-SD-NEXT: sshll2 v3.2d, v4.4s, #0
865 ; CHECK-SD-NEXT: sshll v2.2d, v4.2s, #0
866 ; CHECK-SD-NEXT: sshll v4.2d, v5.2s, #0
867 ; CHECK-SD-NEXT: sshll2 v7.2d, v6.4s, #0
868 ; CHECK-SD-NEXT: sshll2 v5.2d, v5.4s, #0
869 ; CHECK-SD-NEXT: sshll v6.2d, v6.2s, #0
872 ; CHECK-GI-LABEL: sext_v16i8_v16i64:
873 ; CHECK-GI: // %bb.0: // %entry
874 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
875 ; CHECK-GI-NEXT: sshll2 v0.8h, v0.16b, #0
876 ; CHECK-GI-NEXT: sshll v2.4s, v1.4h, #0
877 ; CHECK-GI-NEXT: sshll2 v3.4s, v1.8h, #0
878 ; CHECK-GI-NEXT: sshll v5.4s, v0.4h, #0
879 ; CHECK-GI-NEXT: sshll2 v7.4s, v0.8h, #0
880 ; CHECK-GI-NEXT: sshll v0.2d, v2.2s, #0
881 ; CHECK-GI-NEXT: sshll2 v1.2d, v2.4s, #0
882 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
883 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
884 ; CHECK-GI-NEXT: sshll v4.2d, v5.2s, #0
885 ; CHECK-GI-NEXT: sshll2 v5.2d, v5.4s, #0
886 ; CHECK-GI-NEXT: sshll v6.2d, v7.2s, #0
887 ; CHECK-GI-NEXT: sshll2 v7.2d, v7.4s, #0
890 %c = sext <16 x i8> %a to <16 x i64>
894 define <16 x i32> @sext_v16i16_v16i32(<16 x i16> %a) {
895 ; CHECK-SD-LABEL: sext_v16i16_v16i32:
896 ; CHECK-SD: // %bb.0: // %entry
897 ; CHECK-SD-NEXT: sshll v5.4s, v0.4h, #0
898 ; CHECK-SD-NEXT: sshll2 v4.4s, v0.8h, #0
899 ; CHECK-SD-NEXT: sshll2 v3.4s, v1.8h, #0
900 ; CHECK-SD-NEXT: sshll v2.4s, v1.4h, #0
901 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
902 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
905 ; CHECK-GI-LABEL: sext_v16i16_v16i32:
906 ; CHECK-GI: // %bb.0: // %entry
907 ; CHECK-GI-NEXT: sshll v4.4s, v0.4h, #0
908 ; CHECK-GI-NEXT: sshll2 v5.4s, v0.8h, #0
909 ; CHECK-GI-NEXT: sshll v2.4s, v1.4h, #0
910 ; CHECK-GI-NEXT: sshll2 v3.4s, v1.8h, #0
911 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
912 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
915 %c = sext <16 x i16> %a to <16 x i32>
919 define <16 x i64> @sext_v16i16_v16i64(<16 x i16> %a) {
920 ; CHECK-SD-LABEL: sext_v16i16_v16i64:
921 ; CHECK-SD: // %bb.0: // %entry
922 ; CHECK-SD-NEXT: sshll v2.4s, v0.4h, #0
923 ; CHECK-SD-NEXT: sshll2 v4.4s, v0.8h, #0
924 ; CHECK-SD-NEXT: sshll v5.4s, v1.4h, #0
925 ; CHECK-SD-NEXT: sshll2 v6.4s, v1.8h, #0
926 ; CHECK-SD-NEXT: sshll2 v1.2d, v2.4s, #0
927 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
928 ; CHECK-SD-NEXT: sshll2 v3.2d, v4.4s, #0
929 ; CHECK-SD-NEXT: sshll v2.2d, v4.2s, #0
930 ; CHECK-SD-NEXT: sshll v4.2d, v5.2s, #0
931 ; CHECK-SD-NEXT: sshll2 v7.2d, v6.4s, #0
932 ; CHECK-SD-NEXT: sshll2 v5.2d, v5.4s, #0
933 ; CHECK-SD-NEXT: sshll v6.2d, v6.2s, #0
936 ; CHECK-GI-LABEL: sext_v16i16_v16i64:
937 ; CHECK-GI: // %bb.0: // %entry
938 ; CHECK-GI-NEXT: sshll v2.4s, v0.4h, #0
939 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
940 ; CHECK-GI-NEXT: sshll v5.4s, v1.4h, #0
941 ; CHECK-GI-NEXT: sshll2 v7.4s, v1.8h, #0
942 ; CHECK-GI-NEXT: sshll v0.2d, v2.2s, #0
943 ; CHECK-GI-NEXT: sshll2 v1.2d, v2.4s, #0
944 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
945 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
946 ; CHECK-GI-NEXT: sshll v4.2d, v5.2s, #0
947 ; CHECK-GI-NEXT: sshll2 v5.2d, v5.4s, #0
948 ; CHECK-GI-NEXT: sshll v6.2d, v7.2s, #0
949 ; CHECK-GI-NEXT: sshll2 v7.2d, v7.4s, #0
952 %c = sext <16 x i16> %a to <16 x i64>
956 define <16 x i64> @sext_v16i32_v16i64(<16 x i32> %a) {
957 ; CHECK-SD-LABEL: sext_v16i32_v16i64:
958 ; CHECK-SD: // %bb.0: // %entry
959 ; CHECK-SD-NEXT: sshll2 v17.2d, v0.4s, #0
960 ; CHECK-SD-NEXT: sshll2 v16.2d, v1.4s, #0
961 ; CHECK-SD-NEXT: sshll v18.2d, v1.2s, #0
962 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
963 ; CHECK-SD-NEXT: sshll v4.2d, v2.2s, #0
964 ; CHECK-SD-NEXT: sshll2 v5.2d, v2.4s, #0
965 ; CHECK-SD-NEXT: sshll2 v7.2d, v3.4s, #0
966 ; CHECK-SD-NEXT: sshll v6.2d, v3.2s, #0
967 ; CHECK-SD-NEXT: mov v1.16b, v17.16b
968 ; CHECK-SD-NEXT: mov v2.16b, v18.16b
969 ; CHECK-SD-NEXT: mov v3.16b, v16.16b
972 ; CHECK-GI-LABEL: sext_v16i32_v16i64:
973 ; CHECK-GI: // %bb.0: // %entry
974 ; CHECK-GI-NEXT: sshll v16.2d, v0.2s, #0
975 ; CHECK-GI-NEXT: sshll2 v17.2d, v0.4s, #0
976 ; CHECK-GI-NEXT: sshll v18.2d, v1.2s, #0
977 ; CHECK-GI-NEXT: sshll2 v19.2d, v1.4s, #0
978 ; CHECK-GI-NEXT: sshll v4.2d, v2.2s, #0
979 ; CHECK-GI-NEXT: sshll2 v5.2d, v2.4s, #0
980 ; CHECK-GI-NEXT: sshll v6.2d, v3.2s, #0
981 ; CHECK-GI-NEXT: sshll2 v7.2d, v3.4s, #0
982 ; CHECK-GI-NEXT: mov v0.16b, v16.16b
983 ; CHECK-GI-NEXT: mov v1.16b, v17.16b
984 ; CHECK-GI-NEXT: mov v2.16b, v18.16b
985 ; CHECK-GI-NEXT: mov v3.16b, v19.16b
988 %c = sext <16 x i32> %a to <16 x i64>
992 define <16 x i16> @sext_v16i10_v16i16(<16 x i10> %a) {
993 ; CHECK-SD-LABEL: sext_v16i10_v16i16:
994 ; CHECK-SD: // %bb.0: // %entry
995 ; CHECK-SD-NEXT: ldr w8, [sp]
996 ; CHECK-SD-NEXT: fmov s1, w0
997 ; CHECK-SD-NEXT: ldr w9, [sp, #8]
998 ; CHECK-SD-NEXT: fmov s0, w8
999 ; CHECK-SD-NEXT: ldr w8, [sp, #16]
1000 ; CHECK-SD-NEXT: mov v1.h[1], w1
1001 ; CHECK-SD-NEXT: mov v0.h[1], w9
1002 ; CHECK-SD-NEXT: mov v1.h[2], w2
1003 ; CHECK-SD-NEXT: mov v0.h[2], w8
1004 ; CHECK-SD-NEXT: ldr w8, [sp, #24]
1005 ; CHECK-SD-NEXT: mov v1.h[3], w3
1006 ; CHECK-SD-NEXT: mov v0.h[3], w8
1007 ; CHECK-SD-NEXT: ldr w8, [sp, #32]
1008 ; CHECK-SD-NEXT: mov v1.h[4], w4
1009 ; CHECK-SD-NEXT: mov v0.h[4], w8
1010 ; CHECK-SD-NEXT: ldr w8, [sp, #40]
1011 ; CHECK-SD-NEXT: mov v1.h[5], w5
1012 ; CHECK-SD-NEXT: mov v0.h[5], w8
1013 ; CHECK-SD-NEXT: ldr w8, [sp, #48]
1014 ; CHECK-SD-NEXT: mov v1.h[6], w6
1015 ; CHECK-SD-NEXT: mov v0.h[6], w8
1016 ; CHECK-SD-NEXT: ldr w8, [sp, #56]
1017 ; CHECK-SD-NEXT: mov v1.h[7], w7
1018 ; CHECK-SD-NEXT: mov v0.h[7], w8
1019 ; CHECK-SD-NEXT: shl v1.8h, v1.8h, #6
1020 ; CHECK-SD-NEXT: shl v2.8h, v0.8h, #6
1021 ; CHECK-SD-NEXT: sshr v0.8h, v1.8h, #6
1022 ; CHECK-SD-NEXT: sshr v1.8h, v2.8h, #6
1023 ; CHECK-SD-NEXT: ret
1025 ; CHECK-GI-LABEL: sext_v16i10_v16i16:
1026 ; CHECK-GI: // %bb.0: // %entry
1027 ; CHECK-GI-NEXT: fmov s4, w0
1028 ; CHECK-GI-NEXT: fmov s5, w4
1029 ; CHECK-GI-NEXT: ldr s0, [sp]
1030 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1031 ; CHECK-GI-NEXT: ldr s2, [sp, #32]
1032 ; CHECK-GI-NEXT: ldr s3, [sp, #40]
1033 ; CHECK-GI-NEXT: mov v4.s[1], w1
1034 ; CHECK-GI-NEXT: mov v5.s[1], w5
1035 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1036 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1037 ; CHECK-GI-NEXT: ldr s1, [sp, #16]
1038 ; CHECK-GI-NEXT: ldr s3, [sp, #48]
1039 ; CHECK-GI-NEXT: mov v4.s[2], w2
1040 ; CHECK-GI-NEXT: mov v5.s[2], w6
1041 ; CHECK-GI-NEXT: mov v0.s[2], v1.s[0]
1042 ; CHECK-GI-NEXT: mov v2.s[2], v3.s[0]
1043 ; CHECK-GI-NEXT: ldr s1, [sp, #24]
1044 ; CHECK-GI-NEXT: ldr s3, [sp, #56]
1045 ; CHECK-GI-NEXT: mov v4.s[3], w3
1046 ; CHECK-GI-NEXT: mov v5.s[3], w7
1047 ; CHECK-GI-NEXT: mov v0.s[3], v1.s[0]
1048 ; CHECK-GI-NEXT: mov v2.s[3], v3.s[0]
1049 ; CHECK-GI-NEXT: uzp1 v1.8h, v4.8h, v5.8h
1050 ; CHECK-GI-NEXT: uzp1 v0.8h, v0.8h, v2.8h
1051 ; CHECK-GI-NEXT: shl v1.8h, v1.8h, #6
1052 ; CHECK-GI-NEXT: shl v2.8h, v0.8h, #6
1053 ; CHECK-GI-NEXT: sshr v0.8h, v1.8h, #6
1054 ; CHECK-GI-NEXT: sshr v1.8h, v2.8h, #6
1055 ; CHECK-GI-NEXT: ret
1057 %c = sext <16 x i10> %a to <16 x i16>
1061 define <16 x i32> @sext_v16i10_v16i32(<16 x i10> %a) {
1062 ; CHECK-SD-LABEL: sext_v16i10_v16i32:
1063 ; CHECK-SD: // %bb.0: // %entry
1064 ; CHECK-SD-NEXT: ldr w8, [sp, #32]
1065 ; CHECK-SD-NEXT: ldr w9, [sp]
1066 ; CHECK-SD-NEXT: fmov s0, w0
1067 ; CHECK-SD-NEXT: fmov s1, w4
1068 ; CHECK-SD-NEXT: ldr w10, [sp, #40]
1069 ; CHECK-SD-NEXT: ldr w11, [sp, #8]
1070 ; CHECK-SD-NEXT: fmov s2, w9
1071 ; CHECK-SD-NEXT: fmov s3, w8
1072 ; CHECK-SD-NEXT: ldr w8, [sp, #48]
1073 ; CHECK-SD-NEXT: mov v0.h[1], w1
1074 ; CHECK-SD-NEXT: ldr w9, [sp, #16]
1075 ; CHECK-SD-NEXT: mov v1.h[1], w5
1076 ; CHECK-SD-NEXT: mov v2.h[1], w11
1077 ; CHECK-SD-NEXT: mov v3.h[1], w10
1078 ; CHECK-SD-NEXT: mov v0.h[2], w2
1079 ; CHECK-SD-NEXT: mov v1.h[2], w6
1080 ; CHECK-SD-NEXT: mov v2.h[2], w9
1081 ; CHECK-SD-NEXT: mov v3.h[2], w8
1082 ; CHECK-SD-NEXT: ldr w8, [sp, #56]
1083 ; CHECK-SD-NEXT: ldr w9, [sp, #24]
1084 ; CHECK-SD-NEXT: mov v0.h[3], w3
1085 ; CHECK-SD-NEXT: mov v1.h[3], w7
1086 ; CHECK-SD-NEXT: mov v2.h[3], w9
1087 ; CHECK-SD-NEXT: mov v3.h[3], w8
1088 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
1089 ; CHECK-SD-NEXT: ushll v1.4s, v1.4h, #0
1090 ; CHECK-SD-NEXT: ushll v2.4s, v2.4h, #0
1091 ; CHECK-SD-NEXT: ushll v3.4s, v3.4h, #0
1092 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #22
1093 ; CHECK-SD-NEXT: shl v1.4s, v1.4s, #22
1094 ; CHECK-SD-NEXT: shl v2.4s, v2.4s, #22
1095 ; CHECK-SD-NEXT: shl v3.4s, v3.4s, #22
1096 ; CHECK-SD-NEXT: sshr v0.4s, v0.4s, #22
1097 ; CHECK-SD-NEXT: sshr v1.4s, v1.4s, #22
1098 ; CHECK-SD-NEXT: sshr v2.4s, v2.4s, #22
1099 ; CHECK-SD-NEXT: sshr v3.4s, v3.4s, #22
1100 ; CHECK-SD-NEXT: ret
1102 ; CHECK-GI-LABEL: sext_v16i10_v16i32:
1103 ; CHECK-GI: // %bb.0: // %entry
1104 ; CHECK-GI-NEXT: fmov s4, w0
1105 ; CHECK-GI-NEXT: fmov s5, w4
1106 ; CHECK-GI-NEXT: ldr s0, [sp]
1107 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1108 ; CHECK-GI-NEXT: ldr s2, [sp, #32]
1109 ; CHECK-GI-NEXT: ldr s3, [sp, #40]
1110 ; CHECK-GI-NEXT: mov v4.s[1], w1
1111 ; CHECK-GI-NEXT: mov v5.s[1], w5
1112 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1113 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1114 ; CHECK-GI-NEXT: ldr s1, [sp, #16]
1115 ; CHECK-GI-NEXT: ldr s3, [sp, #48]
1116 ; CHECK-GI-NEXT: mov v4.s[2], w2
1117 ; CHECK-GI-NEXT: mov v5.s[2], w6
1118 ; CHECK-GI-NEXT: mov v0.s[2], v1.s[0]
1119 ; CHECK-GI-NEXT: mov v2.s[2], v3.s[0]
1120 ; CHECK-GI-NEXT: ldr s1, [sp, #24]
1121 ; CHECK-GI-NEXT: ldr s3, [sp, #56]
1122 ; CHECK-GI-NEXT: mov v4.s[3], w3
1123 ; CHECK-GI-NEXT: mov v5.s[3], w7
1124 ; CHECK-GI-NEXT: mov v0.s[3], v1.s[0]
1125 ; CHECK-GI-NEXT: mov v2.s[3], v3.s[0]
1126 ; CHECK-GI-NEXT: shl v1.4s, v4.4s, #22
1127 ; CHECK-GI-NEXT: shl v3.4s, v5.4s, #22
1128 ; CHECK-GI-NEXT: shl v4.4s, v0.4s, #22
1129 ; CHECK-GI-NEXT: shl v5.4s, v2.4s, #22
1130 ; CHECK-GI-NEXT: sshr v0.4s, v1.4s, #22
1131 ; CHECK-GI-NEXT: sshr v1.4s, v3.4s, #22
1132 ; CHECK-GI-NEXT: sshr v2.4s, v4.4s, #22
1133 ; CHECK-GI-NEXT: sshr v3.4s, v5.4s, #22
1134 ; CHECK-GI-NEXT: ret
1136 %c = sext <16 x i10> %a to <16 x i32>
1140 define <16 x i64> @sext_v16i10_v16i64(<16 x i10> %a) {
1141 ; CHECK-SD-LABEL: sext_v16i10_v16i64:
1142 ; CHECK-SD: // %bb.0: // %entry
1143 ; CHECK-SD-NEXT: fmov s0, w2
1144 ; CHECK-SD-NEXT: fmov s1, w0
1145 ; CHECK-SD-NEXT: ldr s2, [sp]
1146 ; CHECK-SD-NEXT: fmov s3, w4
1147 ; CHECK-SD-NEXT: fmov s4, w6
1148 ; CHECK-SD-NEXT: add x8, sp, #8
1149 ; CHECK-SD-NEXT: ldr s5, [sp, #16]
1150 ; CHECK-SD-NEXT: ldr s6, [sp, #32]
1151 ; CHECK-SD-NEXT: ldr s7, [sp, #48]
1152 ; CHECK-SD-NEXT: mov v1.s[1], w1
1153 ; CHECK-SD-NEXT: mov v0.s[1], w3
1154 ; CHECK-SD-NEXT: ld1 { v2.s }[1], [x8]
1155 ; CHECK-SD-NEXT: mov v3.s[1], w5
1156 ; CHECK-SD-NEXT: mov v4.s[1], w7
1157 ; CHECK-SD-NEXT: add x8, sp, #24
1158 ; CHECK-SD-NEXT: add x9, sp, #40
1159 ; CHECK-SD-NEXT: add x10, sp, #56
1160 ; CHECK-SD-NEXT: ld1 { v5.s }[1], [x8]
1161 ; CHECK-SD-NEXT: ld1 { v6.s }[1], [x9]
1162 ; CHECK-SD-NEXT: ld1 { v7.s }[1], [x10]
1163 ; CHECK-SD-NEXT: ushll v2.2d, v2.2s, #0
1164 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
1165 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
1166 ; CHECK-SD-NEXT: ushll v3.2d, v3.2s, #0
1167 ; CHECK-SD-NEXT: ushll v4.2d, v4.2s, #0
1168 ; CHECK-SD-NEXT: ushll v5.2d, v5.2s, #0
1169 ; CHECK-SD-NEXT: ushll v6.2d, v6.2s, #0
1170 ; CHECK-SD-NEXT: ushll v7.2d, v7.2s, #0
1171 ; CHECK-SD-NEXT: shl v17.2d, v2.2d, #54
1172 ; CHECK-SD-NEXT: shl v1.2d, v1.2d, #54
1173 ; CHECK-SD-NEXT: shl v16.2d, v0.2d, #54
1174 ; CHECK-SD-NEXT: shl v3.2d, v3.2d, #54
1175 ; CHECK-SD-NEXT: shl v4.2d, v4.2d, #54
1176 ; CHECK-SD-NEXT: shl v5.2d, v5.2d, #54
1177 ; CHECK-SD-NEXT: shl v6.2d, v6.2d, #54
1178 ; CHECK-SD-NEXT: shl v7.2d, v7.2d, #54
1179 ; CHECK-SD-NEXT: sshr v0.2d, v1.2d, #54
1180 ; CHECK-SD-NEXT: sshr v1.2d, v16.2d, #54
1181 ; CHECK-SD-NEXT: sshr v2.2d, v3.2d, #54
1182 ; CHECK-SD-NEXT: sshr v3.2d, v4.2d, #54
1183 ; CHECK-SD-NEXT: sshr v4.2d, v17.2d, #54
1184 ; CHECK-SD-NEXT: sshr v5.2d, v5.2d, #54
1185 ; CHECK-SD-NEXT: sshr v6.2d, v6.2d, #54
1186 ; CHECK-SD-NEXT: sshr v7.2d, v7.2d, #54
1187 ; CHECK-SD-NEXT: ret
1189 ; CHECK-GI-LABEL: sext_v16i10_v16i64:
1190 ; CHECK-GI: // %bb.0: // %entry
1191 ; CHECK-GI-NEXT: fmov s7, w0
1192 ; CHECK-GI-NEXT: fmov s17, w2
1193 ; CHECK-GI-NEXT: ldr s0, [sp]
1194 ; CHECK-GI-NEXT: fmov s18, w4
1195 ; CHECK-GI-NEXT: fmov s19, w6
1196 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1197 ; CHECK-GI-NEXT: ldr s2, [sp, #16]
1198 ; CHECK-GI-NEXT: ldr s3, [sp, #24]
1199 ; CHECK-GI-NEXT: ldr s4, [sp, #32]
1200 ; CHECK-GI-NEXT: ldr s5, [sp, #40]
1201 ; CHECK-GI-NEXT: ldr s6, [sp, #48]
1202 ; CHECK-GI-NEXT: ldr s16, [sp, #56]
1203 ; CHECK-GI-NEXT: mov v7.s[1], w1
1204 ; CHECK-GI-NEXT: mov v17.s[1], w3
1205 ; CHECK-GI-NEXT: mov v18.s[1], w5
1206 ; CHECK-GI-NEXT: mov v19.s[1], w7
1207 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1208 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1209 ; CHECK-GI-NEXT: mov v4.s[1], v5.s[0]
1210 ; CHECK-GI-NEXT: mov v6.s[1], v16.s[0]
1211 ; CHECK-GI-NEXT: ushll v1.2d, v7.2s, #0
1212 ; CHECK-GI-NEXT: ushll v3.2d, v17.2s, #0
1213 ; CHECK-GI-NEXT: ushll v5.2d, v18.2s, #0
1214 ; CHECK-GI-NEXT: ushll v7.2d, v19.2s, #0
1215 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
1216 ; CHECK-GI-NEXT: ushll v2.2d, v2.2s, #0
1217 ; CHECK-GI-NEXT: ushll v4.2d, v4.2s, #0
1218 ; CHECK-GI-NEXT: ushll v6.2d, v6.2s, #0
1219 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
1220 ; CHECK-GI-NEXT: shl v3.2d, v3.2d, #54
1221 ; CHECK-GI-NEXT: shl v5.2d, v5.2d, #54
1222 ; CHECK-GI-NEXT: shl v7.2d, v7.2d, #54
1223 ; CHECK-GI-NEXT: shl v16.2d, v0.2d, #54
1224 ; CHECK-GI-NEXT: shl v17.2d, v2.2d, #54
1225 ; CHECK-GI-NEXT: shl v18.2d, v4.2d, #54
1226 ; CHECK-GI-NEXT: shl v19.2d, v6.2d, #54
1227 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #54
1228 ; CHECK-GI-NEXT: sshr v1.2d, v3.2d, #54
1229 ; CHECK-GI-NEXT: sshr v2.2d, v5.2d, #54
1230 ; CHECK-GI-NEXT: sshr v3.2d, v7.2d, #54
1231 ; CHECK-GI-NEXT: sshr v4.2d, v16.2d, #54
1232 ; CHECK-GI-NEXT: sshr v5.2d, v17.2d, #54
1233 ; CHECK-GI-NEXT: sshr v6.2d, v18.2d, #54
1234 ; CHECK-GI-NEXT: sshr v7.2d, v19.2d, #54
1235 ; CHECK-GI-NEXT: ret
1237 %c = sext <16 x i10> %a to <16 x i64>