1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -O0 -stop-after=irtranslator -global-isel -verify-machineinstrs %s -o - 2>&1 | FileCheck %s
4 define i8 @v1s8_add(<1 x i8> %a0) {
5 ; CHECK-LABEL: name: v1s8_add
6 ; CHECK: bb.1 (%ir-block.0):
8 ; CHECK: [[COPY:%[0-9]+]]:_(<8 x s8>) = COPY $d0
9 ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8), [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<8 x s8>)
10 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
11 ; CHECK: $w0 = COPY [[ANYEXT]](s32)
12 ; CHECK: RET_ReallyLR implicit $w0
13 %res = bitcast <1 x i8> %a0 to i8
17 define i24 @test_v3i8(<3 x i8> %a) {
18 ; CHECK-LABEL: name: test_v3i8
19 ; CHECK: bb.1 (%ir-block.0):
20 ; CHECK: liveins: $w0, $w1, $w2
21 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
22 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
23 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
24 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[COPY1]](s32), [[COPY2]](s32)
25 ; CHECK: [[TRUNC:%[0-9]+]]:_(<3 x s8>) = G_TRUNC [[BUILD_VECTOR]](<3 x s32>)
26 ; CHECK: [[BITCAST:%[0-9]+]]:_(s24) = G_BITCAST [[TRUNC]](<3 x s8>)
27 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[BITCAST]](s24)
28 ; CHECK: $w0 = COPY [[ANYEXT]](s32)
29 ; CHECK: RET_ReallyLR implicit $w0
30 %res = bitcast <3 x i8> %a to i24
35 define <1 x half> @test_v1s16(<1 x float> %x) {
36 ; CHECK-LABEL: name: test_v1s16
37 ; CHECK: bb.1 (%ir-block.0):
39 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
40 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
41 ; CHECK: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[UV]](s32)
42 ; CHECK: $h0 = COPY [[FPTRUNC]](s16)
43 ; CHECK: RET_ReallyLR implicit $h0
44 %tmp = fptrunc <1 x float> %x to <1 x half>
48 declare <3 x float> @bar(float)
49 define void @test_return_v3f32() {
50 ; CHECK-LABEL: name: test_return_v3f32
51 ; CHECK: bb.1 (%ir-block.0):
52 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
53 ; CHECK: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
54 ; CHECK: $s0 = COPY [[DEF]](s32)
55 ; CHECK: BL @bar, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $s0, implicit-def $q0
56 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
57 ; CHECK: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY]](<2 x s64>)
58 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
59 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s32>) = G_CONCAT_VECTORS [[BITCAST]](<4 x s32>), [[DEF1]](<4 x s32>), [[DEF1]](<4 x s32>)
60 ; CHECK: [[UV:%[0-9]+]]:_(<3 x s32>), [[UV1:%[0-9]+]]:_(<3 x s32>), [[UV2:%[0-9]+]]:_(<3 x s32>), [[UV3:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s32>)
61 ; CHECK: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
63 %call = call <3 x float> @bar(float undef)