1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -verify-machineinstrs -O0 -run-pass=instruction-select -global-isel-abort=1 %s -o - | FileCheck %s
9 tracksRegLiveness: true
11 - { id: 0, class: fpr }
12 - { id: 1, class: fpr }
13 - { id: 2, class: gpr }
14 - { id: 3, class: fpr }
19 ; CHECK-LABEL: name: v2s32_fpr
22 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
23 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
24 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
25 ; CHECK-NEXT: [[DUPi32_:%[0-9]+]]:fpr32 = DUPi32 [[INSERT_SUBREG]], 1
26 ; CHECK-NEXT: $s0 = COPY [[DUPi32_]]
27 ; CHECK-NEXT: RET_ReallyLR implicit $s0
28 %0:fpr(<2 x s32>) = COPY $d0
29 %2:gpr(s64) = G_CONSTANT i64 1
30 %3:fpr(s64) = COPY %2(s64)
31 %1:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
33 RET_ReallyLR implicit $s0
41 tracksRegLiveness: true
45 ; CHECK-LABEL: name: v2s32_fpr_idx0
48 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
49 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]].ssub
50 ; CHECK-NEXT: $s0 = COPY [[COPY1]]
51 ; CHECK-NEXT: RET_ReallyLR implicit $s0
52 %0:fpr(<2 x s32>) = COPY $d0
53 %2:gpr(s64) = G_CONSTANT i64 0
54 %3:fpr(s64) = COPY %2(s64)
55 %1:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
57 RET_ReallyLR implicit $s0
65 tracksRegLiveness: true
67 - { id: 0, class: fpr }
68 - { id: 1, class: fpr }
69 - { id: 2, class: gpr }
70 - { id: 3, class: fpr }
75 ; CHECK-LABEL: name: v2s64_fpr
78 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
79 ; CHECK-NEXT: [[DUPi64_:%[0-9]+]]:fpr64 = DUPi64 [[COPY]], 2
80 ; CHECK-NEXT: $d0 = COPY [[DUPi64_]]
81 ; CHECK-NEXT: RET_ReallyLR implicit $d0
82 %0:fpr(<2 x s64>) = COPY $q0
83 %2:gpr(s64) = G_CONSTANT i64 2
84 %3:fpr(s64) = COPY %2(s64)
85 %1:fpr(s64) = G_EXTRACT_VECTOR_ELT %0(<2 x s64>), %3(s64)
87 RET_ReallyLR implicit $d0
95 tracksRegLiveness: true
97 - { id: 0, class: fpr }
98 - { id: 1, class: fpr }
99 - { id: 2, class: gpr }
100 - { id: 3, class: fpr }
105 ; CHECK-LABEL: name: v4s16_fpr
106 ; CHECK: liveins: $d0
108 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
109 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
110 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
111 ; CHECK-NEXT: [[DUPi16_:%[0-9]+]]:fpr16 = DUPi16 [[INSERT_SUBREG]], 1
112 ; CHECK-NEXT: $h0 = COPY [[DUPi16_]]
113 ; CHECK-NEXT: RET_ReallyLR implicit $h0
114 %0:fpr(<4 x s16>) = COPY $d0
115 %2:gpr(s64) = G_CONSTANT i64 1
116 %3:fpr(s64) = COPY %2(s64)
117 %1:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<4 x s16>), %3(s64)
119 RET_ReallyLR implicit $h0
126 regBankSelected: true
127 tracksRegLiveness: true
131 ; CHECK-LABEL: name: v8s16_fpr
132 ; CHECK: liveins: $q0
134 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
135 ; CHECK-NEXT: [[DUPi16_:%[0-9]+]]:fpr16 = DUPi16 [[COPY]], 1
136 ; CHECK-NEXT: $h0 = COPY [[DUPi16_]]
137 ; CHECK-NEXT: RET_ReallyLR implicit $h0
138 %0:fpr(<8 x s16>) = COPY $q0
139 %2:gpr(s64) = G_CONSTANT i64 1
140 %3:fpr(s64) = COPY %2(s64)
141 %1:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
143 RET_ReallyLR implicit $h0
150 regBankSelected: true
151 tracksRegLiveness: true
155 ; CHECK-LABEL: name: v8s16_fpr_zext
156 ; CHECK: liveins: $q0
158 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
159 ; CHECK-NEXT: [[DUPi16_:%[0-9]+]]:fpr16 = DUPi16 [[COPY]], 1
160 ; CHECK-NEXT: $h0 = COPY [[DUPi16_]]
161 ; CHECK-NEXT: RET_ReallyLR implicit $h0
162 %0:fpr(<8 x s16>) = COPY $q0
163 %1:gpr(s32) = G_CONSTANT i32 1
164 %2:gpr(s64) = G_ZEXT %1
165 %3:fpr(s64) = COPY %2(s64)
166 %4:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
168 RET_ReallyLR implicit $h0
175 regBankSelected: true
176 tracksRegLiveness: true
180 ; CHECK-LABEL: name: v8s16_fpr_sext
181 ; CHECK: liveins: $q0
183 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
184 ; CHECK-NEXT: [[DUPi16_:%[0-9]+]]:fpr16 = DUPi16 [[COPY]], 1
185 ; CHECK-NEXT: $h0 = COPY [[DUPi16_]]
186 ; CHECK-NEXT: RET_ReallyLR implicit $h0
187 %0:fpr(<8 x s16>) = COPY $q0
188 %1:gpr(s32) = G_CONSTANT i32 1
189 %2:gpr(s64) = G_SEXT %1
190 %3:fpr(s64) = COPY %2(s64)
191 %4:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %3(s64)
193 RET_ReallyLR implicit $h0
197 name: v8s16_fpr_trunc
200 regBankSelected: true
201 tracksRegLiveness: true
205 ; CHECK-LABEL: name: v8s16_fpr_trunc
206 ; CHECK: liveins: $q0
208 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
209 ; CHECK-NEXT: [[DUPi16_:%[0-9]+]]:fpr16 = DUPi16 [[COPY]], 1
210 ; CHECK-NEXT: $h0 = COPY [[DUPi16_]]
211 ; CHECK-NEXT: RET_ReallyLR implicit $h0
212 %0:fpr(<8 x s16>) = COPY $q0
213 %1:gpr(s64) = G_CONSTANT i64 1
214 %2:gpr(s32) = G_TRUNC %1
215 %3:gpr(s64) = G_SEXT %2
216 %4:fpr(s64) = COPY %3(s64)
217 %5:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %4(s64)
219 RET_ReallyLR implicit $h0
225 regBankSelected: true
226 tracksRegLiveness: true
233 ; CHECK-LABEL: name: v16s8
234 ; CHECK: liveins: $q0
236 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
237 ; CHECK-NEXT: [[UMOVvi8_:%[0-9]+]]:gpr32 = UMOVvi8 [[COPY]], 0
238 ; CHECK-NEXT: $w0 = COPY [[UMOVvi8_]]
239 ; CHECK-NEXT: RET_ReallyLR implicit $w0
240 %0:fpr(<16 x s8>) = COPY $q0
241 %2:gpr(s64) = G_CONSTANT i64 0
242 %1:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<16 x s8>), %2(s64)
243 %4:gpr(s8) = COPY %1(s8)
244 %3:gpr(s32) = G_ANYEXT %4(s8)
246 RET_ReallyLR implicit $w0
253 regBankSelected: true
254 tracksRegLiveness: true
261 ; CHECK-LABEL: name: v8s8
262 ; CHECK: liveins: $d0
264 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
265 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
266 ; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
267 ; CHECK-NEXT: [[UMOVvi8_:%[0-9]+]]:gpr32 = UMOVvi8 [[INSERT_SUBREG]], 0
268 ; CHECK-NEXT: $w0 = COPY [[UMOVvi8_]]
269 ; CHECK-NEXT: RET_ReallyLR implicit $w0
270 %0:fpr(<8 x s8>) = COPY $d0
271 %2:gpr(s64) = G_CONSTANT i64 0
272 %1:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<8 x s8>), %2(s64)
273 %4:gpr(s8) = COPY %1(s8)
274 %3:gpr(s32) = G_ANYEXT %4(s8)
276 RET_ReallyLR implicit $w0
283 regBankSelected: true
284 tracksRegLiveness: true
289 ; CHECK-LABEL: name: v2p0
290 ; CHECK: liveins: $q0
292 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
293 ; CHECK-NEXT: [[DUPi64_:%[0-9]+]]:fpr64 = DUPi64 [[COPY]], 1
294 ; CHECK-NEXT: $d0 = COPY [[DUPi64_]]
295 ; CHECK-NEXT: RET_ReallyLR implicit $d0
296 %0:fpr(<2 x p0>) = COPY $q0
297 %2:gpr(s64) = G_CONSTANT i64 1
298 %1:fpr(p0) = G_EXTRACT_VECTOR_ELT %0(<2 x p0>), %2(s64)
300 RET_ReallyLR implicit $d0