1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-lowering -global-isel -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: v4s32
13 ; CHECK-NEXT: %v1:_(<4 x s32>) = COPY $q0
14 ; CHECK-NEXT: %unused:_(<2 x s32>), %unmerge:_(<2 x s32>) = G_UNMERGE_VALUES %v1(<4 x s32>)
15 ; CHECK-NEXT: %fpext:_(<2 x s64>) = G_FPEXT %unmerge(<2 x s32>)
16 ; CHECK-NEXT: $q0 = COPY %fpext(<2 x s64>)
17 ; CHECK-NEXT: RET_ReallyLR implicit $q0
18 %v1:_(<4 x s32>) = COPY $q0
19 %implicit:_(<4 x s32>) = G_IMPLICIT_DEF
20 %C:_(s32) = G_CONSTANT i32 8
21 %ext:_(<4 x s32>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
22 %unmerge:_(<2 x s32>), %unused:_(<2 x s32>) = G_UNMERGE_VALUES %ext:_(<4 x s32>)
23 %fpext:_(<2 x s64>) = G_FPEXT %unmerge:_(<2 x s32>)
25 RET_ReallyLR implicit $q0
33 ; CHECK-LABEL: name: v8s16
36 ; CHECK-NEXT: %v1:_(<8 x s16>) = COPY $q0
37 ; CHECK-NEXT: %unused:_(<4 x s16>), %unmerge:_(<4 x s16>) = G_UNMERGE_VALUES %v1(<8 x s16>)
38 ; CHECK-NEXT: %fpext:_(<4 x s32>) = G_FPEXT %unmerge(<4 x s16>)
39 ; CHECK-NEXT: $q0 = COPY %fpext(<4 x s32>)
40 ; CHECK-NEXT: RET_ReallyLR implicit $q0
41 %v1:_(<8 x s16>) = COPY $q0
42 %implicit:_(<8 x s16>) = G_IMPLICIT_DEF
43 %C:_(s32) = G_CONSTANT i32 8
44 %ext:_(<8 x s16>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
45 %unmerge:_(<4 x s16>), %unused:_(<4 x s16>) = G_UNMERGE_VALUES %ext:_(<8 x s16>)
46 %fpext:_(<4 x s32>) = G_FPEXT %unmerge:_(<4 x s16>)
48 RET_ReallyLR implicit $q0
56 ; CHECK-LABEL: name: v16s8
59 ; CHECK-NEXT: %v1:_(<16 x s8>) = COPY $q0
60 ; CHECK-NEXT: %unused:_(<8 x s8>), %unmerge:_(<8 x s8>) = G_UNMERGE_VALUES %v1(<16 x s8>)
61 ; CHECK-NEXT: %fpext:_(<8 x s16>) = G_FPEXT %unmerge(<8 x s8>)
62 ; CHECK-NEXT: $q0 = COPY %fpext(<8 x s16>)
63 ; CHECK-NEXT: RET_ReallyLR implicit $q0
64 %v1:_(<16 x s8>) = COPY $q0
65 %implicit:_(<16 x s8>) = G_IMPLICIT_DEF
66 %C:_(s32) = G_CONSTANT i32 8
67 %ext:_(<16 x s8>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
68 %unmerge:_(<8 x s8>), %unused:_(<8 x s8>) = G_UNMERGE_VALUES %ext:_(<16 x s8>)
69 %fpext:_(<8 x s16>) = G_FPEXT %unmerge:_(<8 x s8>)
71 RET_ReallyLR implicit $q0
79 ; CHECK-LABEL: name: skip_not_const
80 ; CHECK: liveins: $q0, $w0
82 ; CHECK-NEXT: %v1:_(<16 x s8>) = COPY $q0
83 ; CHECK-NEXT: %implicit:_(<16 x s8>) = G_IMPLICIT_DEF
84 ; CHECK-NEXT: %C:_(s32) = COPY $w0
85 ; CHECK-NEXT: %ext:_(<16 x s8>) = G_EXT %v1, %implicit, %C(s32)
86 ; CHECK-NEXT: %unmerge:_(<8 x s8>), %unused:_(<8 x s8>) = G_UNMERGE_VALUES %ext(<16 x s8>)
87 ; CHECK-NEXT: %fpext:_(<8 x s16>) = G_FPEXT %unmerge(<8 x s8>)
88 ; CHECK-NEXT: $q0 = COPY %fpext(<8 x s16>)
89 ; CHECK-NEXT: RET_ReallyLR implicit $q0
90 %v1:_(<16 x s8>) = COPY $q0
91 %implicit:_(<16 x s8>) = G_IMPLICIT_DEF
93 %ext:_(<16 x s8>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
94 %unmerge:_(<8 x s8>), %unused:_(<8 x s8>) = G_UNMERGE_VALUES %ext:_(<16 x s8>)
95 %fpext:_(<8 x s16>) = G_FPEXT %unmerge:_(<8 x s8>)
97 RET_ReallyLR implicit $q0
100 name: skip_not_unused
105 ; CHECK-LABEL: name: skip_not_unused
106 ; CHECK: liveins: $q0
108 ; CHECK-NEXT: %v1:_(<16 x s8>) = COPY $q0
109 ; CHECK-NEXT: %implicit:_(<16 x s8>) = G_IMPLICIT_DEF
110 ; CHECK-NEXT: %C:_(s32) = G_CONSTANT i32 8
111 ; CHECK-NEXT: %ext:_(<16 x s8>) = G_EXT %v1, %implicit, %C(s32)
112 ; CHECK-NEXT: %unmerge:_(<8 x s8>), %unused:_(<8 x s8>) = G_UNMERGE_VALUES %ext(<16 x s8>)
113 ; CHECK-NEXT: %fpext:_(<8 x s16>) = G_FPEXT %unmerge(<8 x s8>)
114 ; CHECK-NEXT: %fpext2:_(<8 x s16>) = G_FPEXT %unused(<8 x s8>)
115 ; CHECK-NEXT: $q0 = COPY %fpext(<8 x s16>)
116 ; CHECK-NEXT: $q1 = COPY %fpext2(<8 x s16>)
117 ; CHECK-NEXT: RET_ReallyLR implicit $q0, implicit $q1
118 %v1:_(<16 x s8>) = COPY $q0
119 %implicit:_(<16 x s8>) = G_IMPLICIT_DEF
120 %C:_(s32) = G_CONSTANT i32 8
121 %ext:_(<16 x s8>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
122 %unmerge:_(<8 x s8>), %unused:_(<8 x s8>) = G_UNMERGE_VALUES %ext:_(<16 x s8>)
123 %fpext:_(<8 x s16>) = G_FPEXT %unmerge:_(<8 x s8>)
124 %fpext2:_(<8 x s16>) = G_FPEXT %unused:_(<8 x s8>)
127 RET_ReallyLR implicit $q0, implicit $q1
135 ; CHECK-LABEL: name: skip_borders
136 ; CHECK: liveins: $q0
138 ; CHECK-NEXT: %v1:_(<4 x s32>) = COPY $q0
139 ; CHECK-NEXT: %implicit:_(<4 x s32>) = G_IMPLICIT_DEF
140 ; CHECK-NEXT: %C:_(s32) = G_CONSTANT i32 9
141 ; CHECK-NEXT: %ext:_(<4 x s32>) = G_EXT %v1, %implicit, %C(s32)
142 ; CHECK-NEXT: %unmerge:_(<2 x s32>), %unused:_(<2 x s32>) = G_UNMERGE_VALUES %ext(<4 x s32>)
143 ; CHECK-NEXT: %fpext:_(<2 x s64>) = G_FPEXT %unmerge(<2 x s32>)
144 ; CHECK-NEXT: $q0 = COPY %fpext(<2 x s64>)
145 ; CHECK-NEXT: RET_ReallyLR implicit $q0
146 %v1:_(<4 x s32>) = COPY $q0
147 %implicit:_(<4 x s32>) = G_IMPLICIT_DEF
148 %C:_(s32) = G_CONSTANT i32 9
149 %ext:_(<4 x s32>) = G_EXT %v1:_, %implicit:_, %C:_(s32)
150 %unmerge:_(<2 x s32>), %unused:_(<2 x s32>) = G_UNMERGE_VALUES %ext:_(<4 x s32>)
151 %fpext:_(<2 x s64>) = G_FPEXT %unmerge:_(<2 x s32>)
153 RET_ReallyLR implicit $q0