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 sext_v3i8_v3i16
6 ; CHECK-GI-NEXT: warning: Instruction selection used fallback path for sext_v3i8_v3i32
7 ; CHECK-GI-NEXT: warning: Instruction selection used fallback path for sext_v3i10_v3i16
8 ; CHECK-GI-NEXT: warning: Instruction selection used fallback path for sext_v3i10_v3i32
9 ; CHECK-GI-NEXT: warning: Instruction selection used fallback path for sext_v16i10_v16i16
11 define i16 @sext_i8_to_i16(i8 %a) {
12 ; CHECK-LABEL: sext_i8_to_i16:
13 ; CHECK: // %bb.0: // %entry
14 ; CHECK-NEXT: sxtb w0, w0
17 %c = sext i8 %a to i16
21 define i32 @sext_i8_to_i32(i8 %a) {
22 ; CHECK-LABEL: sext_i8_to_i32:
23 ; CHECK: // %bb.0: // %entry
24 ; CHECK-NEXT: sxtb w0, w0
27 %c = sext i8 %a to i32
31 define i64 @sext_i8_to_i64(i8 %a) {
32 ; CHECK-LABEL: sext_i8_to_i64:
33 ; CHECK: // %bb.0: // %entry
34 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
35 ; CHECK-NEXT: sxtb x0, w0
38 %c = sext i8 %a to i64
42 define i10 @sext_i8_to_i10(i8 %a) {
43 ; CHECK-LABEL: sext_i8_to_i10:
44 ; CHECK: // %bb.0: // %entry
45 ; CHECK-NEXT: sxtb w0, w0
48 %c = sext i8 %a to i10
52 define i32 @sext_i16_to_i32(i16 %a) {
53 ; CHECK-LABEL: sext_i16_to_i32:
54 ; CHECK: // %bb.0: // %entry
55 ; CHECK-NEXT: sxth w0, w0
58 %c = sext i16 %a to i32
62 define i64 @sext_i16_to_i64(i16 %a) {
63 ; CHECK-LABEL: sext_i16_to_i64:
64 ; CHECK: // %bb.0: // %entry
65 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
66 ; CHECK-NEXT: sxth x0, w0
69 %c = sext i16 %a to i64
73 define i64 @sext_i32_to_i64(i32 %a) {
74 ; CHECK-LABEL: sext_i32_to_i64:
75 ; CHECK: // %bb.0: // %entry
76 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
77 ; CHECK-NEXT: sxtw x0, w0
80 %c = sext i32 %a to i64
84 define i16 @sext_i10_to_i16(i10 %a) {
85 ; CHECK-LABEL: sext_i10_to_i16:
86 ; CHECK: // %bb.0: // %entry
87 ; CHECK-NEXT: sbfx w0, w0, #0, #10
90 %c = sext i10 %a to i16
94 define i32 @sext_i10_to_i32(i10 %a) {
95 ; CHECK-LABEL: sext_i10_to_i32:
96 ; CHECK: // %bb.0: // %entry
97 ; CHECK-NEXT: sbfx w0, w0, #0, #10
100 %c = sext i10 %a to i32
104 define i64 @sext_i10_to_i64(i10 %a) {
105 ; CHECK-LABEL: sext_i10_to_i64:
106 ; CHECK: // %bb.0: // %entry
107 ; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
108 ; CHECK-NEXT: sbfx x0, x0, #0, #10
111 %c = sext i10 %a to i64
115 define <2 x i16> @sext_v2i8_v2i16(<2 x i8> %a) {
116 ; CHECK-LABEL: sext_v2i8_v2i16:
117 ; CHECK: // %bb.0: // %entry
118 ; CHECK-NEXT: shl v0.2s, v0.2s, #24
119 ; CHECK-NEXT: sshr v0.2s, v0.2s, #24
122 %c = sext <2 x i8> %a to <2 x i16>
126 define <2 x i32> @sext_v2i8_v2i32(<2 x i8> %a) {
127 ; CHECK-LABEL: sext_v2i8_v2i32:
128 ; CHECK: // %bb.0: // %entry
129 ; CHECK-NEXT: shl v0.2s, v0.2s, #24
130 ; CHECK-NEXT: sshr v0.2s, v0.2s, #24
133 %c = sext <2 x i8> %a to <2 x i32>
137 define <2 x i64> @sext_v2i8_v2i64(<2 x i8> %a) {
138 ; CHECK-LABEL: sext_v2i8_v2i64:
139 ; CHECK: // %bb.0: // %entry
140 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
141 ; CHECK-NEXT: shl v0.2d, v0.2d, #56
142 ; CHECK-NEXT: sshr v0.2d, v0.2d, #56
145 %c = sext <2 x i8> %a to <2 x i64>
149 define <2 x i32> @sext_v2i16_v2i32(<2 x i16> %a) {
150 ; CHECK-LABEL: sext_v2i16_v2i32:
151 ; CHECK: // %bb.0: // %entry
152 ; CHECK-NEXT: shl v0.2s, v0.2s, #16
153 ; CHECK-NEXT: sshr v0.2s, v0.2s, #16
156 %c = sext <2 x i16> %a to <2 x i32>
160 define <2 x i64> @sext_v2i16_v2i64(<2 x i16> %a) {
161 ; CHECK-LABEL: sext_v2i16_v2i64:
162 ; CHECK: // %bb.0: // %entry
163 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
164 ; CHECK-NEXT: shl v0.2d, v0.2d, #48
165 ; CHECK-NEXT: sshr v0.2d, v0.2d, #48
168 %c = sext <2 x i16> %a to <2 x i64>
172 define <2 x i64> @sext_v2i32_v2i64(<2 x i32> %a) {
173 ; CHECK-LABEL: sext_v2i32_v2i64:
174 ; CHECK: // %bb.0: // %entry
175 ; CHECK-NEXT: sshll v0.2d, v0.2s, #0
178 %c = sext <2 x i32> %a to <2 x i64>
182 define <2 x i16> @sext_v2i10_v2i16(<2 x i10> %a) {
183 ; CHECK-LABEL: sext_v2i10_v2i16:
184 ; CHECK: // %bb.0: // %entry
185 ; CHECK-NEXT: shl v0.2s, v0.2s, #22
186 ; CHECK-NEXT: sshr v0.2s, v0.2s, #22
189 %c = sext <2 x i10> %a to <2 x i16>
193 define <2 x i32> @sext_v2i10_v2i32(<2 x i10> %a) {
194 ; CHECK-LABEL: sext_v2i10_v2i32:
195 ; CHECK: // %bb.0: // %entry
196 ; CHECK-NEXT: shl v0.2s, v0.2s, #22
197 ; CHECK-NEXT: sshr v0.2s, v0.2s, #22
200 %c = sext <2 x i10> %a to <2 x i32>
204 define <2 x i64> @sext_v2i10_v2i64(<2 x i10> %a) {
205 ; CHECK-LABEL: sext_v2i10_v2i64:
206 ; CHECK: // %bb.0: // %entry
207 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
208 ; CHECK-NEXT: shl v0.2d, v0.2d, #54
209 ; CHECK-NEXT: sshr v0.2d, v0.2d, #54
212 %c = sext <2 x i10> %a to <2 x i64>
216 define <3 x i16> @sext_v3i8_v3i16(<3 x i8> %a) {
217 ; CHECK-LABEL: sext_v3i8_v3i16:
218 ; CHECK: // %bb.0: // %entry
219 ; CHECK-NEXT: fmov s0, w0
220 ; CHECK-NEXT: mov v0.h[1], w1
221 ; CHECK-NEXT: mov v0.h[2], w2
222 ; CHECK-NEXT: shl v0.4h, v0.4h, #8
223 ; CHECK-NEXT: sshr v0.4h, v0.4h, #8
226 %c = sext <3 x i8> %a to <3 x i16>
230 define <3 x i32> @sext_v3i8_v3i32(<3 x i8> %a) {
231 ; CHECK-LABEL: sext_v3i8_v3i32:
232 ; CHECK: // %bb.0: // %entry
233 ; CHECK-NEXT: fmov s0, w0
234 ; CHECK-NEXT: mov v0.h[1], w1
235 ; CHECK-NEXT: mov v0.h[2], w2
236 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
237 ; CHECK-NEXT: shl v0.4s, v0.4s, #24
238 ; CHECK-NEXT: sshr v0.4s, v0.4s, #24
241 %c = sext <3 x i8> %a to <3 x i32>
245 define <3 x i64> @sext_v3i8_v3i64(<3 x i8> %a) {
246 ; CHECK-SD-LABEL: sext_v3i8_v3i64:
247 ; CHECK-SD: // %bb.0: // %entry
248 ; CHECK-SD-NEXT: fmov s0, w0
249 ; CHECK-SD-NEXT: fmov s1, w2
250 ; CHECK-SD-NEXT: mov v0.s[1], w1
251 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
252 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #56
253 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
254 ; CHECK-SD-NEXT: sshr v2.2d, v2.2d, #56
255 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #56
256 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
257 ; CHECK-SD-NEXT: sshr v0.2d, v0.2d, #56
258 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
259 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
260 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
263 ; CHECK-GI-LABEL: sext_v3i8_v3i64:
264 ; CHECK-GI: // %bb.0: // %entry
265 ; CHECK-GI-NEXT: // kill: def $w0 killed $w0 def $x0
266 ; CHECK-GI-NEXT: fmov d0, x0
267 ; CHECK-GI-NEXT: // kill: def $w1 killed $w1 def $x1
268 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
269 ; CHECK-GI-NEXT: lsl x8, x2, #56
270 ; CHECK-GI-NEXT: asr x8, x8, #56
271 ; CHECK-GI-NEXT: mov v0.d[1], x1
272 ; CHECK-GI-NEXT: fmov d2, x8
273 ; CHECK-GI-NEXT: shl v0.2d, v0.2d, #56
274 ; CHECK-GI-NEXT: sshr v0.2d, v0.2d, #56
275 ; CHECK-GI-NEXT: mov d1, v0.d[1]
276 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
279 %c = sext <3 x i8> %a to <3 x i64>
283 define <3 x i32> @sext_v3i16_v3i32(<3 x i16> %a) {
284 ; CHECK-SD-LABEL: sext_v3i16_v3i32:
285 ; CHECK-SD: // %bb.0: // %entry
286 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
289 ; CHECK-GI-LABEL: sext_v3i16_v3i32:
290 ; CHECK-GI: // %bb.0: // %entry
291 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
292 ; CHECK-GI-NEXT: mov h1, v0.h[1]
293 ; CHECK-GI-NEXT: fmov w8, s0
294 ; CHECK-GI-NEXT: mov h2, v0.h[2]
295 ; CHECK-GI-NEXT: sxth w8, w8
296 ; CHECK-GI-NEXT: fmov w9, s1
297 ; CHECK-GI-NEXT: fmov s0, w8
298 ; CHECK-GI-NEXT: fmov w8, s2
299 ; CHECK-GI-NEXT: sxth w9, w9
300 ; CHECK-GI-NEXT: sxth w8, w8
301 ; CHECK-GI-NEXT: mov v0.s[1], w9
302 ; CHECK-GI-NEXT: mov v0.s[2], w8
303 ; CHECK-GI-NEXT: mov v0.s[3], w8
306 %c = sext <3 x i16> %a to <3 x i32>
310 define <3 x i64> @sext_v3i16_v3i64(<3 x i16> %a) {
311 ; CHECK-SD-LABEL: sext_v3i16_v3i64:
312 ; CHECK-SD: // %bb.0: // %entry
313 ; CHECK-SD-NEXT: sshll v2.4s, v0.4h, #0
314 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
315 ; CHECK-SD-NEXT: sshll2 v2.2d, v2.4s, #0
316 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
317 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
318 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
319 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
322 ; CHECK-GI-LABEL: sext_v3i16_v3i64:
323 ; CHECK-GI: // %bb.0: // %entry
324 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
325 ; CHECK-GI-NEXT: mov h1, v0.h[1]
326 ; CHECK-GI-NEXT: mov h2, v0.h[2]
327 ; CHECK-GI-NEXT: fmov w8, s0
328 ; CHECK-GI-NEXT: sxth x8, w8
329 ; CHECK-GI-NEXT: fmov w9, s1
330 ; CHECK-GI-NEXT: fmov w10, s2
331 ; CHECK-GI-NEXT: fmov d0, x8
332 ; CHECK-GI-NEXT: sxth x9, w9
333 ; CHECK-GI-NEXT: sxth x10, w10
334 ; CHECK-GI-NEXT: fmov d1, x9
335 ; CHECK-GI-NEXT: fmov d2, x10
338 %c = sext <3 x i16> %a to <3 x i64>
342 define <3 x i64> @sext_v3i32_v3i64(<3 x i32> %a) {
343 ; CHECK-SD-LABEL: sext_v3i32_v3i64:
344 ; CHECK-SD: // %bb.0: // %entry
345 ; CHECK-SD-NEXT: sshll v3.2d, v0.2s, #0
346 ; CHECK-SD-NEXT: sshll2 v2.2d, v0.4s, #0
347 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
348 ; CHECK-SD-NEXT: fmov d0, d3
349 ; CHECK-SD-NEXT: ext v1.16b, v3.16b, v3.16b, #8
350 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
353 ; CHECK-GI-LABEL: sext_v3i32_v3i64:
354 ; CHECK-GI: // %bb.0: // %entry
355 ; CHECK-GI-NEXT: mov s1, v0.s[1]
356 ; CHECK-GI-NEXT: mov s2, v0.s[2]
357 ; CHECK-GI-NEXT: fmov w8, s0
358 ; CHECK-GI-NEXT: sxtw x8, w8
359 ; CHECK-GI-NEXT: fmov w9, s1
360 ; CHECK-GI-NEXT: fmov w10, s2
361 ; CHECK-GI-NEXT: fmov d0, x8
362 ; CHECK-GI-NEXT: sxtw x9, w9
363 ; CHECK-GI-NEXT: sxtw x10, w10
364 ; CHECK-GI-NEXT: fmov d1, x9
365 ; CHECK-GI-NEXT: fmov d2, x10
368 %c = sext <3 x i32> %a to <3 x i64>
372 define <3 x i16> @sext_v3i10_v3i16(<3 x i10> %a) {
373 ; CHECK-LABEL: sext_v3i10_v3i16:
374 ; CHECK: // %bb.0: // %entry
375 ; CHECK-NEXT: fmov s0, w0
376 ; CHECK-NEXT: mov v0.h[1], w1
377 ; CHECK-NEXT: mov v0.h[2], w2
378 ; CHECK-NEXT: shl v0.4h, v0.4h, #6
379 ; CHECK-NEXT: sshr v0.4h, v0.4h, #6
382 %c = sext <3 x i10> %a to <3 x i16>
386 define <3 x i32> @sext_v3i10_v3i32(<3 x i10> %a) {
387 ; CHECK-LABEL: sext_v3i10_v3i32:
388 ; CHECK: // %bb.0: // %entry
389 ; CHECK-NEXT: fmov s0, w0
390 ; CHECK-NEXT: mov v0.h[1], w1
391 ; CHECK-NEXT: mov v0.h[2], w2
392 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
393 ; CHECK-NEXT: shl v0.4s, v0.4s, #22
394 ; CHECK-NEXT: sshr v0.4s, v0.4s, #22
397 %c = sext <3 x i10> %a to <3 x i32>
401 define <3 x i64> @sext_v3i10_v3i64(<3 x i10> %a) {
402 ; CHECK-SD-LABEL: sext_v3i10_v3i64:
403 ; CHECK-SD: // %bb.0: // %entry
404 ; CHECK-SD-NEXT: fmov s0, w0
405 ; CHECK-SD-NEXT: fmov s1, w2
406 ; CHECK-SD-NEXT: mov v0.s[1], w1
407 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
408 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #54
409 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
410 ; CHECK-SD-NEXT: sshr v2.2d, v2.2d, #54
411 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #54
412 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
413 ; CHECK-SD-NEXT: sshr v0.2d, v0.2d, #54
414 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
415 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
416 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
419 ; CHECK-GI-LABEL: sext_v3i10_v3i64:
420 ; CHECK-GI: // %bb.0: // %entry
421 ; CHECK-GI-NEXT: // kill: def $w0 killed $w0 def $x0
422 ; CHECK-GI-NEXT: fmov d0, x0
423 ; CHECK-GI-NEXT: // kill: def $w1 killed $w1 def $x1
424 ; CHECK-GI-NEXT: // kill: def $w2 killed $w2 def $x2
425 ; CHECK-GI-NEXT: lsl x8, x2, #54
426 ; CHECK-GI-NEXT: asr x8, x8, #54
427 ; CHECK-GI-NEXT: mov v0.d[1], x1
428 ; CHECK-GI-NEXT: fmov d2, x8
429 ; CHECK-GI-NEXT: shl v0.2d, v0.2d, #54
430 ; CHECK-GI-NEXT: sshr v0.2d, v0.2d, #54
431 ; CHECK-GI-NEXT: mov d1, v0.d[1]
432 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
435 %c = sext <3 x i10> %a to <3 x i64>
439 define <4 x i16> @sext_v4i8_v4i16(<4 x i8> %a) {
440 ; CHECK-LABEL: sext_v4i8_v4i16:
441 ; CHECK: // %bb.0: // %entry
442 ; CHECK-NEXT: shl v0.4h, v0.4h, #8
443 ; CHECK-NEXT: sshr v0.4h, v0.4h, #8
446 %c = sext <4 x i8> %a to <4 x i16>
450 define <4 x i32> @sext_v4i8_v4i32(<4 x i8> %a) {
451 ; CHECK-LABEL: sext_v4i8_v4i32:
452 ; CHECK: // %bb.0: // %entry
453 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
454 ; CHECK-NEXT: shl v0.4s, v0.4s, #24
455 ; CHECK-NEXT: sshr v0.4s, v0.4s, #24
458 %c = sext <4 x i8> %a to <4 x i32>
462 define <4 x i64> @sext_v4i8_v4i64(<4 x i8> %a) {
463 ; CHECK-SD-LABEL: sext_v4i8_v4i64:
464 ; CHECK-SD: // %bb.0: // %entry
465 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
466 ; CHECK-SD-NEXT: ushll v1.2d, v0.2s, #0
467 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
468 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #56
469 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #56
470 ; CHECK-SD-NEXT: sshr v1.2d, v0.2d, #56
471 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #56
474 ; CHECK-GI-LABEL: sext_v4i8_v4i64:
475 ; CHECK-GI: // %bb.0: // %entry
476 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
477 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
478 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
479 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #56
480 ; CHECK-GI-NEXT: shl v2.2d, v0.2d, #56
481 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #56
482 ; CHECK-GI-NEXT: sshr v1.2d, v2.2d, #56
485 %c = sext <4 x i8> %a to <4 x i64>
489 define <4 x i32> @sext_v4i16_v4i32(<4 x i16> %a) {
490 ; CHECK-LABEL: sext_v4i16_v4i32:
491 ; CHECK: // %bb.0: // %entry
492 ; CHECK-NEXT: sshll v0.4s, v0.4h, #0
495 %c = sext <4 x i16> %a to <4 x i32>
499 define <4 x i64> @sext_v4i16_v4i64(<4 x i16> %a) {
500 ; CHECK-SD-LABEL: sext_v4i16_v4i64:
501 ; CHECK-SD: // %bb.0: // %entry
502 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
503 ; CHECK-SD-NEXT: sshll2 v1.2d, v0.4s, #0
504 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
507 ; CHECK-GI-LABEL: sext_v4i16_v4i64:
508 ; CHECK-GI: // %bb.0: // %entry
509 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
510 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
511 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
514 %c = sext <4 x i16> %a to <4 x i64>
518 define <4 x i64> @sext_v4i32_v4i64(<4 x i32> %a) {
519 ; CHECK-SD-LABEL: sext_v4i32_v4i64:
520 ; CHECK-SD: // %bb.0: // %entry
521 ; CHECK-SD-NEXT: sshll2 v1.2d, v0.4s, #0
522 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
525 ; CHECK-GI-LABEL: sext_v4i32_v4i64:
526 ; CHECK-GI: // %bb.0: // %entry
527 ; CHECK-GI-NEXT: sshll v2.2d, v0.2s, #0
528 ; CHECK-GI-NEXT: sshll2 v1.2d, v0.4s, #0
529 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
532 %c = sext <4 x i32> %a to <4 x i64>
536 define <4 x i16> @sext_v4i10_v4i16(<4 x i10> %a) {
537 ; CHECK-LABEL: sext_v4i10_v4i16:
538 ; CHECK: // %bb.0: // %entry
539 ; CHECK-NEXT: shl v0.4h, v0.4h, #6
540 ; CHECK-NEXT: sshr v0.4h, v0.4h, #6
543 %c = sext <4 x i10> %a to <4 x i16>
547 define <4 x i32> @sext_v4i10_v4i32(<4 x i10> %a) {
548 ; CHECK-LABEL: sext_v4i10_v4i32:
549 ; CHECK: // %bb.0: // %entry
550 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
551 ; CHECK-NEXT: shl v0.4s, v0.4s, #22
552 ; CHECK-NEXT: sshr v0.4s, v0.4s, #22
555 %c = sext <4 x i10> %a to <4 x i32>
559 define <4 x i64> @sext_v4i10_v4i64(<4 x i10> %a) {
560 ; CHECK-SD-LABEL: sext_v4i10_v4i64:
561 ; CHECK-SD: // %bb.0: // %entry
562 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
563 ; CHECK-SD-NEXT: ushll v1.2d, v0.2s, #0
564 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
565 ; CHECK-SD-NEXT: shl v0.2d, v0.2d, #54
566 ; CHECK-SD-NEXT: shl v2.2d, v1.2d, #54
567 ; CHECK-SD-NEXT: sshr v1.2d, v0.2d, #54
568 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #54
571 ; CHECK-GI-LABEL: sext_v4i10_v4i64:
572 ; CHECK-GI: // %bb.0: // %entry
573 ; CHECK-GI-NEXT: ushll v0.4s, v0.4h, #0
574 ; CHECK-GI-NEXT: ushll v1.2d, v0.2s, #0
575 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
576 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
577 ; CHECK-GI-NEXT: shl v2.2d, v0.2d, #54
578 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #54
579 ; CHECK-GI-NEXT: sshr v1.2d, v2.2d, #54
582 %c = sext <4 x i10> %a to <4 x i64>
586 define <8 x i16> @sext_v8i8_v8i16(<8 x i8> %a) {
587 ; CHECK-LABEL: sext_v8i8_v8i16:
588 ; CHECK: // %bb.0: // %entry
589 ; CHECK-NEXT: sshll v0.8h, v0.8b, #0
592 %c = sext <8 x i8> %a to <8 x i16>
596 define <8 x i32> @sext_v8i8_v8i32(<8 x i8> %a) {
597 ; CHECK-SD-LABEL: sext_v8i8_v8i32:
598 ; CHECK-SD: // %bb.0: // %entry
599 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
600 ; CHECK-SD-NEXT: sshll2 v1.4s, v0.8h, #0
601 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
604 ; CHECK-GI-LABEL: sext_v8i8_v8i32:
605 ; CHECK-GI: // %bb.0: // %entry
606 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
607 ; CHECK-GI-NEXT: sshll v0.4s, v1.4h, #0
608 ; CHECK-GI-NEXT: sshll2 v1.4s, v1.8h, #0
611 %c = sext <8 x i8> %a to <8 x i32>
615 define <8 x i64> @sext_v8i8_v8i64(<8 x i8> %a) {
616 ; CHECK-SD-LABEL: sext_v8i8_v8i64:
617 ; CHECK-SD: // %bb.0: // %entry
618 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
619 ; CHECK-SD-NEXT: sshll v1.4s, v0.4h, #0
620 ; CHECK-SD-NEXT: sshll2 v2.4s, v0.8h, #0
621 ; CHECK-SD-NEXT: sshll v0.2d, v1.2s, #0
622 ; CHECK-SD-NEXT: sshll2 v3.2d, v2.4s, #0
623 ; CHECK-SD-NEXT: sshll2 v1.2d, v1.4s, #0
624 ; CHECK-SD-NEXT: sshll v2.2d, v2.2s, #0
627 ; CHECK-GI-LABEL: sext_v8i8_v8i64:
628 ; CHECK-GI: // %bb.0: // %entry
629 ; CHECK-GI-NEXT: sshll v0.8h, v0.8b, #0
630 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
631 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
632 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
633 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
634 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
635 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
638 %c = sext <8 x i8> %a to <8 x i64>
642 define <8 x i32> @sext_v8i16_v8i32(<8 x i16> %a) {
643 ; CHECK-SD-LABEL: sext_v8i16_v8i32:
644 ; CHECK-SD: // %bb.0: // %entry
645 ; CHECK-SD-NEXT: sshll2 v1.4s, v0.8h, #0
646 ; CHECK-SD-NEXT: sshll v0.4s, v0.4h, #0
649 ; CHECK-GI-LABEL: sext_v8i16_v8i32:
650 ; CHECK-GI: // %bb.0: // %entry
651 ; CHECK-GI-NEXT: sshll v2.4s, v0.4h, #0
652 ; CHECK-GI-NEXT: sshll2 v1.4s, v0.8h, #0
653 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
656 %c = sext <8 x i16> %a to <8 x i32>
660 define <8 x i64> @sext_v8i16_v8i64(<8 x i16> %a) {
661 ; CHECK-SD-LABEL: sext_v8i16_v8i64:
662 ; CHECK-SD: // %bb.0: // %entry
663 ; CHECK-SD-NEXT: sshll v1.4s, v0.4h, #0
664 ; CHECK-SD-NEXT: sshll2 v2.4s, v0.8h, #0
665 ; CHECK-SD-NEXT: sshll v0.2d, v1.2s, #0
666 ; CHECK-SD-NEXT: sshll2 v3.2d, v2.4s, #0
667 ; CHECK-SD-NEXT: sshll2 v1.2d, v1.4s, #0
668 ; CHECK-SD-NEXT: sshll v2.2d, v2.2s, #0
671 ; CHECK-GI-LABEL: sext_v8i16_v8i64:
672 ; CHECK-GI: // %bb.0: // %entry
673 ; CHECK-GI-NEXT: sshll v1.4s, v0.4h, #0
674 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
675 ; CHECK-GI-NEXT: sshll v0.2d, v1.2s, #0
676 ; CHECK-GI-NEXT: sshll2 v1.2d, v1.4s, #0
677 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
678 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
681 %c = sext <8 x i16> %a to <8 x i64>
685 define <8 x i64> @sext_v8i32_v8i64(<8 x i32> %a) {
686 ; CHECK-SD-LABEL: sext_v8i32_v8i64:
687 ; CHECK-SD: // %bb.0: // %entry
688 ; CHECK-SD-NEXT: sshll v5.2d, v0.2s, #0
689 ; CHECK-SD-NEXT: sshll2 v4.2d, v0.4s, #0
690 ; CHECK-SD-NEXT: sshll2 v3.2d, v1.4s, #0
691 ; CHECK-SD-NEXT: sshll v2.2d, v1.2s, #0
692 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
693 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
696 ; CHECK-GI-LABEL: sext_v8i32_v8i64:
697 ; CHECK-GI: // %bb.0: // %entry
698 ; CHECK-GI-NEXT: sshll v4.2d, v0.2s, #0
699 ; CHECK-GI-NEXT: sshll2 v5.2d, v0.4s, #0
700 ; CHECK-GI-NEXT: sshll v2.2d, v1.2s, #0
701 ; CHECK-GI-NEXT: sshll2 v3.2d, v1.4s, #0
702 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
703 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
706 %c = sext <8 x i32> %a to <8 x i64>
710 define <8 x i16> @sext_v8i10_v8i16(<8 x i10> %a) {
711 ; CHECK-LABEL: sext_v8i10_v8i16:
712 ; CHECK: // %bb.0: // %entry
713 ; CHECK-NEXT: shl v0.8h, v0.8h, #6
714 ; CHECK-NEXT: sshr v0.8h, v0.8h, #6
717 %c = sext <8 x i10> %a to <8 x i16>
721 define <8 x i32> @sext_v8i10_v8i32(<8 x i10> %a) {
722 ; CHECK-SD-LABEL: sext_v8i10_v8i32:
723 ; CHECK-SD: // %bb.0: // %entry
724 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
725 ; CHECK-SD-NEXT: ushll2 v0.4s, v0.8h, #0
726 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #22
727 ; CHECK-SD-NEXT: shl v2.4s, v1.4s, #22
728 ; CHECK-SD-NEXT: sshr v1.4s, v0.4s, #22
729 ; CHECK-SD-NEXT: sshr v0.4s, v2.4s, #22
732 ; CHECK-GI-LABEL: sext_v8i10_v8i32:
733 ; CHECK-GI: // %bb.0: // %entry
734 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
735 ; CHECK-GI-NEXT: ushll2 v0.4s, v0.8h, #0
736 ; CHECK-GI-NEXT: shl v1.4s, v1.4s, #22
737 ; CHECK-GI-NEXT: shl v2.4s, v0.4s, #22
738 ; CHECK-GI-NEXT: sshr v0.4s, v1.4s, #22
739 ; CHECK-GI-NEXT: sshr v1.4s, v2.4s, #22
742 %c = sext <8 x i10> %a to <8 x i32>
746 define <8 x i64> @sext_v8i10_v8i64(<8 x i10> %a) {
747 ; CHECK-SD-LABEL: sext_v8i10_v8i64:
748 ; CHECK-SD: // %bb.0: // %entry
749 ; CHECK-SD-NEXT: ushll v1.4s, v0.4h, #0
750 ; CHECK-SD-NEXT: ushll2 v0.4s, v0.8h, #0
751 ; CHECK-SD-NEXT: ushll v2.2d, v1.2s, #0
752 ; CHECK-SD-NEXT: ushll v3.2d, v0.2s, #0
753 ; CHECK-SD-NEXT: ushll2 v1.2d, v1.4s, #0
754 ; CHECK-SD-NEXT: ushll2 v0.2d, v0.4s, #0
755 ; CHECK-SD-NEXT: shl v2.2d, v2.2d, #54
756 ; CHECK-SD-NEXT: shl v1.2d, v1.2d, #54
757 ; CHECK-SD-NEXT: shl v5.2d, v3.2d, #54
758 ; CHECK-SD-NEXT: shl v4.2d, v0.2d, #54
759 ; CHECK-SD-NEXT: sshr v0.2d, v2.2d, #54
760 ; CHECK-SD-NEXT: sshr v1.2d, v1.2d, #54
761 ; CHECK-SD-NEXT: sshr v2.2d, v5.2d, #54
762 ; CHECK-SD-NEXT: sshr v3.2d, v4.2d, #54
765 ; CHECK-GI-LABEL: sext_v8i10_v8i64:
766 ; CHECK-GI: // %bb.0: // %entry
767 ; CHECK-GI-NEXT: ushll v1.4s, v0.4h, #0
768 ; CHECK-GI-NEXT: ushll2 v0.4s, v0.8h, #0
769 ; CHECK-GI-NEXT: ushll v2.2d, v1.2s, #0
770 ; CHECK-GI-NEXT: ushll2 v1.2d, v1.4s, #0
771 ; CHECK-GI-NEXT: ushll v3.2d, v0.2s, #0
772 ; CHECK-GI-NEXT: ushll2 v0.2d, v0.4s, #0
773 ; CHECK-GI-NEXT: shl v2.2d, v2.2d, #54
774 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
775 ; CHECK-GI-NEXT: shl v3.2d, v3.2d, #54
776 ; CHECK-GI-NEXT: shl v4.2d, v0.2d, #54
777 ; CHECK-GI-NEXT: sshr v0.2d, v2.2d, #54
778 ; CHECK-GI-NEXT: sshr v1.2d, v1.2d, #54
779 ; CHECK-GI-NEXT: sshr v2.2d, v3.2d, #54
780 ; CHECK-GI-NEXT: sshr v3.2d, v4.2d, #54
783 %c = sext <8 x i10> %a to <8 x i64>
787 define <16 x i16> @sext_v16i8_v16i16(<16 x i8> %a) {
788 ; CHECK-SD-LABEL: sext_v16i8_v16i16:
789 ; CHECK-SD: // %bb.0: // %entry
790 ; CHECK-SD-NEXT: sshll2 v1.8h, v0.16b, #0
791 ; CHECK-SD-NEXT: sshll v0.8h, v0.8b, #0
794 ; CHECK-GI-LABEL: sext_v16i8_v16i16:
795 ; CHECK-GI: // %bb.0: // %entry
796 ; CHECK-GI-NEXT: sshll v2.8h, v0.8b, #0
797 ; CHECK-GI-NEXT: sshll2 v1.8h, v0.16b, #0
798 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
801 %c = sext <16 x i8> %a to <16 x i16>
805 define <16 x i32> @sext_v16i8_v16i32(<16 x i8> %a) {
806 ; CHECK-SD-LABEL: sext_v16i8_v16i32:
807 ; CHECK-SD: // %bb.0: // %entry
808 ; CHECK-SD-NEXT: sshll v1.8h, v0.8b, #0
809 ; CHECK-SD-NEXT: sshll2 v2.8h, v0.16b, #0
810 ; CHECK-SD-NEXT: sshll v0.4s, v1.4h, #0
811 ; CHECK-SD-NEXT: sshll2 v3.4s, v2.8h, #0
812 ; CHECK-SD-NEXT: sshll2 v1.4s, v1.8h, #0
813 ; CHECK-SD-NEXT: sshll v2.4s, v2.4h, #0
816 ; CHECK-GI-LABEL: sext_v16i8_v16i32:
817 ; CHECK-GI: // %bb.0: // %entry
818 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
819 ; CHECK-GI-NEXT: sshll2 v3.8h, v0.16b, #0
820 ; CHECK-GI-NEXT: sshll v0.4s, v1.4h, #0
821 ; CHECK-GI-NEXT: sshll2 v1.4s, v1.8h, #0
822 ; CHECK-GI-NEXT: sshll v2.4s, v3.4h, #0
823 ; CHECK-GI-NEXT: sshll2 v3.4s, v3.8h, #0
826 %c = sext <16 x i8> %a to <16 x i32>
830 define <16 x i64> @sext_v16i8_v16i64(<16 x i8> %a) {
831 ; CHECK-SD-LABEL: sext_v16i8_v16i64:
832 ; CHECK-SD: // %bb.0: // %entry
833 ; CHECK-SD-NEXT: sshll v1.8h, v0.8b, #0
834 ; CHECK-SD-NEXT: sshll2 v0.8h, v0.16b, #0
835 ; CHECK-SD-NEXT: sshll v2.4s, v1.4h, #0
836 ; CHECK-SD-NEXT: sshll2 v4.4s, v1.8h, #0
837 ; CHECK-SD-NEXT: sshll v5.4s, v0.4h, #0
838 ; CHECK-SD-NEXT: sshll2 v6.4s, v0.8h, #0
839 ; CHECK-SD-NEXT: sshll2 v1.2d, v2.4s, #0
840 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
841 ; CHECK-SD-NEXT: sshll2 v3.2d, v4.4s, #0
842 ; CHECK-SD-NEXT: sshll v2.2d, v4.2s, #0
843 ; CHECK-SD-NEXT: sshll v4.2d, v5.2s, #0
844 ; CHECK-SD-NEXT: sshll2 v7.2d, v6.4s, #0
845 ; CHECK-SD-NEXT: sshll2 v5.2d, v5.4s, #0
846 ; CHECK-SD-NEXT: sshll v6.2d, v6.2s, #0
849 ; CHECK-GI-LABEL: sext_v16i8_v16i64:
850 ; CHECK-GI: // %bb.0: // %entry
851 ; CHECK-GI-NEXT: sshll v1.8h, v0.8b, #0
852 ; CHECK-GI-NEXT: sshll2 v0.8h, v0.16b, #0
853 ; CHECK-GI-NEXT: sshll v2.4s, v1.4h, #0
854 ; CHECK-GI-NEXT: sshll2 v3.4s, v1.8h, #0
855 ; CHECK-GI-NEXT: sshll v5.4s, v0.4h, #0
856 ; CHECK-GI-NEXT: sshll2 v7.4s, v0.8h, #0
857 ; CHECK-GI-NEXT: sshll v0.2d, v2.2s, #0
858 ; CHECK-GI-NEXT: sshll2 v1.2d, v2.4s, #0
859 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
860 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
861 ; CHECK-GI-NEXT: sshll v4.2d, v5.2s, #0
862 ; CHECK-GI-NEXT: sshll2 v5.2d, v5.4s, #0
863 ; CHECK-GI-NEXT: sshll v6.2d, v7.2s, #0
864 ; CHECK-GI-NEXT: sshll2 v7.2d, v7.4s, #0
867 %c = sext <16 x i8> %a to <16 x i64>
871 define <16 x i32> @sext_v16i16_v16i32(<16 x i16> %a) {
872 ; CHECK-SD-LABEL: sext_v16i16_v16i32:
873 ; CHECK-SD: // %bb.0: // %entry
874 ; CHECK-SD-NEXT: sshll v5.4s, v0.4h, #0
875 ; CHECK-SD-NEXT: sshll2 v4.4s, v0.8h, #0
876 ; CHECK-SD-NEXT: sshll2 v3.4s, v1.8h, #0
877 ; CHECK-SD-NEXT: sshll v2.4s, v1.4h, #0
878 ; CHECK-SD-NEXT: mov v0.16b, v5.16b
879 ; CHECK-SD-NEXT: mov v1.16b, v4.16b
882 ; CHECK-GI-LABEL: sext_v16i16_v16i32:
883 ; CHECK-GI: // %bb.0: // %entry
884 ; CHECK-GI-NEXT: sshll v4.4s, v0.4h, #0
885 ; CHECK-GI-NEXT: sshll2 v5.4s, v0.8h, #0
886 ; CHECK-GI-NEXT: sshll v2.4s, v1.4h, #0
887 ; CHECK-GI-NEXT: sshll2 v3.4s, v1.8h, #0
888 ; CHECK-GI-NEXT: mov v0.16b, v4.16b
889 ; CHECK-GI-NEXT: mov v1.16b, v5.16b
892 %c = sext <16 x i16> %a to <16 x i32>
896 define <16 x i64> @sext_v16i16_v16i64(<16 x i16> %a) {
897 ; CHECK-SD-LABEL: sext_v16i16_v16i64:
898 ; CHECK-SD: // %bb.0: // %entry
899 ; CHECK-SD-NEXT: sshll v2.4s, v0.4h, #0
900 ; CHECK-SD-NEXT: sshll2 v4.4s, v0.8h, #0
901 ; CHECK-SD-NEXT: sshll v5.4s, v1.4h, #0
902 ; CHECK-SD-NEXT: sshll2 v6.4s, v1.8h, #0
903 ; CHECK-SD-NEXT: sshll2 v1.2d, v2.4s, #0
904 ; CHECK-SD-NEXT: sshll v0.2d, v2.2s, #0
905 ; CHECK-SD-NEXT: sshll2 v3.2d, v4.4s, #0
906 ; CHECK-SD-NEXT: sshll v2.2d, v4.2s, #0
907 ; CHECK-SD-NEXT: sshll v4.2d, v5.2s, #0
908 ; CHECK-SD-NEXT: sshll2 v7.2d, v6.4s, #0
909 ; CHECK-SD-NEXT: sshll2 v5.2d, v5.4s, #0
910 ; CHECK-SD-NEXT: sshll v6.2d, v6.2s, #0
913 ; CHECK-GI-LABEL: sext_v16i16_v16i64:
914 ; CHECK-GI: // %bb.0: // %entry
915 ; CHECK-GI-NEXT: sshll v2.4s, v0.4h, #0
916 ; CHECK-GI-NEXT: sshll2 v3.4s, v0.8h, #0
917 ; CHECK-GI-NEXT: sshll v5.4s, v1.4h, #0
918 ; CHECK-GI-NEXT: sshll2 v7.4s, v1.8h, #0
919 ; CHECK-GI-NEXT: sshll v0.2d, v2.2s, #0
920 ; CHECK-GI-NEXT: sshll2 v1.2d, v2.4s, #0
921 ; CHECK-GI-NEXT: sshll v2.2d, v3.2s, #0
922 ; CHECK-GI-NEXT: sshll2 v3.2d, v3.4s, #0
923 ; CHECK-GI-NEXT: sshll v4.2d, v5.2s, #0
924 ; CHECK-GI-NEXT: sshll2 v5.2d, v5.4s, #0
925 ; CHECK-GI-NEXT: sshll v6.2d, v7.2s, #0
926 ; CHECK-GI-NEXT: sshll2 v7.2d, v7.4s, #0
929 %c = sext <16 x i16> %a to <16 x i64>
933 define <16 x i64> @sext_v16i32_v16i64(<16 x i32> %a) {
934 ; CHECK-SD-LABEL: sext_v16i32_v16i64:
935 ; CHECK-SD: // %bb.0: // %entry
936 ; CHECK-SD-NEXT: sshll2 v17.2d, v0.4s, #0
937 ; CHECK-SD-NEXT: sshll2 v16.2d, v1.4s, #0
938 ; CHECK-SD-NEXT: sshll v18.2d, v1.2s, #0
939 ; CHECK-SD-NEXT: sshll v0.2d, v0.2s, #0
940 ; CHECK-SD-NEXT: sshll v4.2d, v2.2s, #0
941 ; CHECK-SD-NEXT: sshll2 v5.2d, v2.4s, #0
942 ; CHECK-SD-NEXT: sshll2 v7.2d, v3.4s, #0
943 ; CHECK-SD-NEXT: sshll v6.2d, v3.2s, #0
944 ; CHECK-SD-NEXT: mov v1.16b, v17.16b
945 ; CHECK-SD-NEXT: mov v2.16b, v18.16b
946 ; CHECK-SD-NEXT: mov v3.16b, v16.16b
949 ; CHECK-GI-LABEL: sext_v16i32_v16i64:
950 ; CHECK-GI: // %bb.0: // %entry
951 ; CHECK-GI-NEXT: sshll v16.2d, v0.2s, #0
952 ; CHECK-GI-NEXT: sshll2 v17.2d, v0.4s, #0
953 ; CHECK-GI-NEXT: sshll v18.2d, v1.2s, #0
954 ; CHECK-GI-NEXT: sshll2 v19.2d, v1.4s, #0
955 ; CHECK-GI-NEXT: sshll v4.2d, v2.2s, #0
956 ; CHECK-GI-NEXT: sshll2 v5.2d, v2.4s, #0
957 ; CHECK-GI-NEXT: sshll v6.2d, v3.2s, #0
958 ; CHECK-GI-NEXT: sshll2 v7.2d, v3.4s, #0
959 ; CHECK-GI-NEXT: mov v0.16b, v16.16b
960 ; CHECK-GI-NEXT: mov v1.16b, v17.16b
961 ; CHECK-GI-NEXT: mov v2.16b, v18.16b
962 ; CHECK-GI-NEXT: mov v3.16b, v19.16b
965 %c = sext <16 x i32> %a to <16 x i64>
969 define <16 x i16> @sext_v16i10_v16i16(<16 x i10> %a) {
970 ; CHECK-LABEL: sext_v16i10_v16i16:
971 ; CHECK: // %bb.0: // %entry
972 ; CHECK-NEXT: ldr w8, [sp]
973 ; CHECK-NEXT: fmov s1, w0
974 ; CHECK-NEXT: ldr w9, [sp, #8]
975 ; CHECK-NEXT: fmov s0, w8
976 ; CHECK-NEXT: ldr w8, [sp, #16]
977 ; CHECK-NEXT: mov v1.h[1], w1
978 ; CHECK-NEXT: mov v0.h[1], w9
979 ; CHECK-NEXT: mov v1.h[2], w2
980 ; CHECK-NEXT: mov v0.h[2], w8
981 ; CHECK-NEXT: ldr w8, [sp, #24]
982 ; CHECK-NEXT: mov v1.h[3], w3
983 ; CHECK-NEXT: mov v0.h[3], w8
984 ; CHECK-NEXT: ldr w8, [sp, #32]
985 ; CHECK-NEXT: mov v1.h[4], w4
986 ; CHECK-NEXT: mov v0.h[4], w8
987 ; CHECK-NEXT: ldr w8, [sp, #40]
988 ; CHECK-NEXT: mov v1.h[5], w5
989 ; CHECK-NEXT: mov v0.h[5], w8
990 ; CHECK-NEXT: ldr w8, [sp, #48]
991 ; CHECK-NEXT: mov v1.h[6], w6
992 ; CHECK-NEXT: mov v0.h[6], w8
993 ; CHECK-NEXT: ldr w8, [sp, #56]
994 ; CHECK-NEXT: mov v1.h[7], w7
995 ; CHECK-NEXT: mov v0.h[7], w8
996 ; CHECK-NEXT: shl v1.8h, v1.8h, #6
997 ; CHECK-NEXT: shl v2.8h, v0.8h, #6
998 ; CHECK-NEXT: sshr v0.8h, v1.8h, #6
999 ; CHECK-NEXT: sshr v1.8h, v2.8h, #6
1002 %c = sext <16 x i10> %a to <16 x i16>
1006 define <16 x i32> @sext_v16i10_v16i32(<16 x i10> %a) {
1007 ; CHECK-SD-LABEL: sext_v16i10_v16i32:
1008 ; CHECK-SD: // %bb.0: // %entry
1009 ; CHECK-SD-NEXT: ldr w8, [sp, #32]
1010 ; CHECK-SD-NEXT: ldr w9, [sp]
1011 ; CHECK-SD-NEXT: fmov s0, w0
1012 ; CHECK-SD-NEXT: fmov s1, w4
1013 ; CHECK-SD-NEXT: ldr w10, [sp, #40]
1014 ; CHECK-SD-NEXT: ldr w11, [sp, #8]
1015 ; CHECK-SD-NEXT: fmov s2, w9
1016 ; CHECK-SD-NEXT: fmov s3, w8
1017 ; CHECK-SD-NEXT: ldr w8, [sp, #48]
1018 ; CHECK-SD-NEXT: mov v0.h[1], w1
1019 ; CHECK-SD-NEXT: ldr w9, [sp, #16]
1020 ; CHECK-SD-NEXT: mov v1.h[1], w5
1021 ; CHECK-SD-NEXT: mov v2.h[1], w11
1022 ; CHECK-SD-NEXT: mov v3.h[1], w10
1023 ; CHECK-SD-NEXT: mov v0.h[2], w2
1024 ; CHECK-SD-NEXT: mov v1.h[2], w6
1025 ; CHECK-SD-NEXT: mov v2.h[2], w9
1026 ; CHECK-SD-NEXT: mov v3.h[2], w8
1027 ; CHECK-SD-NEXT: ldr w8, [sp, #56]
1028 ; CHECK-SD-NEXT: ldr w9, [sp, #24]
1029 ; CHECK-SD-NEXT: mov v0.h[3], w3
1030 ; CHECK-SD-NEXT: mov v1.h[3], w7
1031 ; CHECK-SD-NEXT: mov v2.h[3], w9
1032 ; CHECK-SD-NEXT: mov v3.h[3], w8
1033 ; CHECK-SD-NEXT: ushll v0.4s, v0.4h, #0
1034 ; CHECK-SD-NEXT: ushll v1.4s, v1.4h, #0
1035 ; CHECK-SD-NEXT: ushll v2.4s, v2.4h, #0
1036 ; CHECK-SD-NEXT: ushll v3.4s, v3.4h, #0
1037 ; CHECK-SD-NEXT: shl v0.4s, v0.4s, #22
1038 ; CHECK-SD-NEXT: shl v1.4s, v1.4s, #22
1039 ; CHECK-SD-NEXT: shl v2.4s, v2.4s, #22
1040 ; CHECK-SD-NEXT: shl v3.4s, v3.4s, #22
1041 ; CHECK-SD-NEXT: sshr v0.4s, v0.4s, #22
1042 ; CHECK-SD-NEXT: sshr v1.4s, v1.4s, #22
1043 ; CHECK-SD-NEXT: sshr v2.4s, v2.4s, #22
1044 ; CHECK-SD-NEXT: sshr v3.4s, v3.4s, #22
1045 ; CHECK-SD-NEXT: ret
1047 ; CHECK-GI-LABEL: sext_v16i10_v16i32:
1048 ; CHECK-GI: // %bb.0: // %entry
1049 ; CHECK-GI-NEXT: fmov s4, w0
1050 ; CHECK-GI-NEXT: fmov s5, w4
1051 ; CHECK-GI-NEXT: ldr s0, [sp]
1052 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1053 ; CHECK-GI-NEXT: ldr s2, [sp, #32]
1054 ; CHECK-GI-NEXT: ldr s3, [sp, #40]
1055 ; CHECK-GI-NEXT: mov v4.s[1], w1
1056 ; CHECK-GI-NEXT: mov v5.s[1], w5
1057 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1058 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1059 ; CHECK-GI-NEXT: ldr s1, [sp, #16]
1060 ; CHECK-GI-NEXT: ldr s3, [sp, #48]
1061 ; CHECK-GI-NEXT: mov v4.s[2], w2
1062 ; CHECK-GI-NEXT: mov v5.s[2], w6
1063 ; CHECK-GI-NEXT: mov v0.s[2], v1.s[0]
1064 ; CHECK-GI-NEXT: mov v2.s[2], v3.s[0]
1065 ; CHECK-GI-NEXT: ldr s1, [sp, #24]
1066 ; CHECK-GI-NEXT: ldr s3, [sp, #56]
1067 ; CHECK-GI-NEXT: mov v4.s[3], w3
1068 ; CHECK-GI-NEXT: mov v5.s[3], w7
1069 ; CHECK-GI-NEXT: mov v0.s[3], v1.s[0]
1070 ; CHECK-GI-NEXT: mov v2.s[3], v3.s[0]
1071 ; CHECK-GI-NEXT: shl v1.4s, v4.4s, #22
1072 ; CHECK-GI-NEXT: shl v3.4s, v5.4s, #22
1073 ; CHECK-GI-NEXT: shl v4.4s, v0.4s, #22
1074 ; CHECK-GI-NEXT: shl v5.4s, v2.4s, #22
1075 ; CHECK-GI-NEXT: sshr v0.4s, v1.4s, #22
1076 ; CHECK-GI-NEXT: sshr v1.4s, v3.4s, #22
1077 ; CHECK-GI-NEXT: sshr v2.4s, v4.4s, #22
1078 ; CHECK-GI-NEXT: sshr v3.4s, v5.4s, #22
1079 ; CHECK-GI-NEXT: ret
1081 %c = sext <16 x i10> %a to <16 x i32>
1085 define <16 x i64> @sext_v16i10_v16i64(<16 x i10> %a) {
1086 ; CHECK-SD-LABEL: sext_v16i10_v16i64:
1087 ; CHECK-SD: // %bb.0: // %entry
1088 ; CHECK-SD-NEXT: fmov s0, w2
1089 ; CHECK-SD-NEXT: fmov s1, w0
1090 ; CHECK-SD-NEXT: ldr s2, [sp]
1091 ; CHECK-SD-NEXT: fmov s3, w4
1092 ; CHECK-SD-NEXT: fmov s4, w6
1093 ; CHECK-SD-NEXT: add x8, sp, #8
1094 ; CHECK-SD-NEXT: ldr s5, [sp, #16]
1095 ; CHECK-SD-NEXT: ldr s6, [sp, #32]
1096 ; CHECK-SD-NEXT: ldr s7, [sp, #48]
1097 ; CHECK-SD-NEXT: mov v1.s[1], w1
1098 ; CHECK-SD-NEXT: mov v0.s[1], w3
1099 ; CHECK-SD-NEXT: ld1 { v2.s }[1], [x8]
1100 ; CHECK-SD-NEXT: mov v3.s[1], w5
1101 ; CHECK-SD-NEXT: mov v4.s[1], w7
1102 ; CHECK-SD-NEXT: add x8, sp, #24
1103 ; CHECK-SD-NEXT: add x9, sp, #40
1104 ; CHECK-SD-NEXT: add x10, sp, #56
1105 ; CHECK-SD-NEXT: ld1 { v5.s }[1], [x8]
1106 ; CHECK-SD-NEXT: ld1 { v6.s }[1], [x9]
1107 ; CHECK-SD-NEXT: ld1 { v7.s }[1], [x10]
1108 ; CHECK-SD-NEXT: ushll v2.2d, v2.2s, #0
1109 ; CHECK-SD-NEXT: ushll v1.2d, v1.2s, #0
1110 ; CHECK-SD-NEXT: ushll v0.2d, v0.2s, #0
1111 ; CHECK-SD-NEXT: ushll v3.2d, v3.2s, #0
1112 ; CHECK-SD-NEXT: ushll v4.2d, v4.2s, #0
1113 ; CHECK-SD-NEXT: ushll v5.2d, v5.2s, #0
1114 ; CHECK-SD-NEXT: ushll v6.2d, v6.2s, #0
1115 ; CHECK-SD-NEXT: ushll v7.2d, v7.2s, #0
1116 ; CHECK-SD-NEXT: shl v17.2d, v2.2d, #54
1117 ; CHECK-SD-NEXT: shl v1.2d, v1.2d, #54
1118 ; CHECK-SD-NEXT: shl v16.2d, v0.2d, #54
1119 ; CHECK-SD-NEXT: shl v3.2d, v3.2d, #54
1120 ; CHECK-SD-NEXT: shl v4.2d, v4.2d, #54
1121 ; CHECK-SD-NEXT: shl v5.2d, v5.2d, #54
1122 ; CHECK-SD-NEXT: shl v6.2d, v6.2d, #54
1123 ; CHECK-SD-NEXT: shl v7.2d, v7.2d, #54
1124 ; CHECK-SD-NEXT: sshr v0.2d, v1.2d, #54
1125 ; CHECK-SD-NEXT: sshr v1.2d, v16.2d, #54
1126 ; CHECK-SD-NEXT: sshr v2.2d, v3.2d, #54
1127 ; CHECK-SD-NEXT: sshr v3.2d, v4.2d, #54
1128 ; CHECK-SD-NEXT: sshr v4.2d, v17.2d, #54
1129 ; CHECK-SD-NEXT: sshr v5.2d, v5.2d, #54
1130 ; CHECK-SD-NEXT: sshr v6.2d, v6.2d, #54
1131 ; CHECK-SD-NEXT: sshr v7.2d, v7.2d, #54
1132 ; CHECK-SD-NEXT: ret
1134 ; CHECK-GI-LABEL: sext_v16i10_v16i64:
1135 ; CHECK-GI: // %bb.0: // %entry
1136 ; CHECK-GI-NEXT: fmov s7, w0
1137 ; CHECK-GI-NEXT: fmov s17, w2
1138 ; CHECK-GI-NEXT: ldr s0, [sp]
1139 ; CHECK-GI-NEXT: fmov s18, w4
1140 ; CHECK-GI-NEXT: fmov s19, w6
1141 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
1142 ; CHECK-GI-NEXT: ldr s2, [sp, #16]
1143 ; CHECK-GI-NEXT: ldr s3, [sp, #24]
1144 ; CHECK-GI-NEXT: ldr s4, [sp, #32]
1145 ; CHECK-GI-NEXT: ldr s5, [sp, #40]
1146 ; CHECK-GI-NEXT: ldr s6, [sp, #48]
1147 ; CHECK-GI-NEXT: ldr s16, [sp, #56]
1148 ; CHECK-GI-NEXT: mov v7.s[1], w1
1149 ; CHECK-GI-NEXT: mov v17.s[1], w3
1150 ; CHECK-GI-NEXT: mov v18.s[1], w5
1151 ; CHECK-GI-NEXT: mov v19.s[1], w7
1152 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
1153 ; CHECK-GI-NEXT: mov v2.s[1], v3.s[0]
1154 ; CHECK-GI-NEXT: mov v4.s[1], v5.s[0]
1155 ; CHECK-GI-NEXT: mov v6.s[1], v16.s[0]
1156 ; CHECK-GI-NEXT: ushll v1.2d, v7.2s, #0
1157 ; CHECK-GI-NEXT: ushll v3.2d, v17.2s, #0
1158 ; CHECK-GI-NEXT: ushll v5.2d, v18.2s, #0
1159 ; CHECK-GI-NEXT: ushll v7.2d, v19.2s, #0
1160 ; CHECK-GI-NEXT: ushll v0.2d, v0.2s, #0
1161 ; CHECK-GI-NEXT: ushll v2.2d, v2.2s, #0
1162 ; CHECK-GI-NEXT: ushll v4.2d, v4.2s, #0
1163 ; CHECK-GI-NEXT: ushll v6.2d, v6.2s, #0
1164 ; CHECK-GI-NEXT: shl v1.2d, v1.2d, #54
1165 ; CHECK-GI-NEXT: shl v3.2d, v3.2d, #54
1166 ; CHECK-GI-NEXT: shl v5.2d, v5.2d, #54
1167 ; CHECK-GI-NEXT: shl v7.2d, v7.2d, #54
1168 ; CHECK-GI-NEXT: shl v16.2d, v0.2d, #54
1169 ; CHECK-GI-NEXT: shl v17.2d, v2.2d, #54
1170 ; CHECK-GI-NEXT: shl v18.2d, v4.2d, #54
1171 ; CHECK-GI-NEXT: shl v19.2d, v6.2d, #54
1172 ; CHECK-GI-NEXT: sshr v0.2d, v1.2d, #54
1173 ; CHECK-GI-NEXT: sshr v1.2d, v3.2d, #54
1174 ; CHECK-GI-NEXT: sshr v2.2d, v5.2d, #54
1175 ; CHECK-GI-NEXT: sshr v3.2d, v7.2d, #54
1176 ; CHECK-GI-NEXT: sshr v4.2d, v16.2d, #54
1177 ; CHECK-GI-NEXT: sshr v5.2d, v17.2d, #54
1178 ; CHECK-GI-NEXT: sshr v6.2d, v18.2d, #54
1179 ; CHECK-GI-NEXT: sshr v7.2d, v19.2d, #54
1180 ; CHECK-GI-NEXT: ret
1182 %c = sext <16 x i10> %a to <16 x i64>