1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
8 tracksRegLiveness: true
13 ; CHECK-LABEL: name: si64
14 ; CHECK: liveins: $q0, $w0
15 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
16 ; CHECK: [[SMOVvi32to64_:%[0-9]+]]:gpr64 = SMOVvi32to64 [[COPY]], 1
17 ; CHECK: $x0 = COPY [[SMOVvi32to64_]]
18 ; CHECK: RET_ReallyLR implicit $x0
19 %0:fpr(<4 x s32>) = COPY $q0
20 %3:gpr(s64) = G_CONSTANT i64 1
21 %2:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<4 x s32>), %3(s64)
22 %5:gpr(s32) = COPY %2(s32)
23 %4:gpr(s64) = G_SEXT %5(s32)
25 RET_ReallyLR implicit $x0
32 tracksRegLiveness: true
37 ; CHECK-LABEL: name: si64_2
38 ; CHECK: liveins: $d0, $w0
39 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
40 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
41 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
42 ; CHECK: [[SMOVvi32to64_:%[0-9]+]]:gpr64 = SMOVvi32to64 [[INSERT_SUBREG]], 1
43 ; CHECK: $x0 = COPY [[SMOVvi32to64_]]
44 ; CHECK: RET_ReallyLR implicit $x0
45 %0:fpr(<2 x s32>) = COPY $d0
46 %3:gpr(s64) = G_CONSTANT i64 1
47 %2:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
48 %5:gpr(s32) = COPY %2(s32)
49 %4:gpr(s64) = G_SEXT %5(s32)
51 RET_ReallyLR implicit $x0
58 tracksRegLiveness: true
63 ; CHECK-LABEL: name: zi64
64 ; CHECK: liveins: $q0, $w0
65 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
66 ; CHECK: [[UMOVvi32_:%[0-9]+]]:gpr32 = UMOVvi32 [[COPY]], 1
67 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, [[UMOVvi32_]], %subreg.sub_32
68 ; CHECK: $x0 = COPY [[SUBREG_TO_REG]]
69 ; CHECK: RET_ReallyLR implicit $x0
70 %0:fpr(<4 x s32>) = COPY $q0
71 %3:gpr(s64) = G_CONSTANT i64 1
72 %2:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<4 x s32>), %3(s64)
73 %5:gpr(s32) = COPY %2(s32)
74 %4:gpr(s64) = G_ZEXT %5(s32)
76 RET_ReallyLR implicit $x0
83 tracksRegLiveness: true
88 ; CHECK-LABEL: name: zi64_2
89 ; CHECK: liveins: $d0, $w0
90 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
91 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
92 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
93 ; CHECK: [[UMOVvi32_:%[0-9]+]]:gpr32 = UMOVvi32 [[INSERT_SUBREG]], 1
94 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, [[UMOVvi32_]], %subreg.sub_32
95 ; CHECK: $x0 = COPY [[SUBREG_TO_REG]]
96 ; CHECK: RET_ReallyLR implicit $x0
97 %0:fpr(<2 x s32>) = COPY $d0
98 %3:gpr(s64) = G_CONSTANT i64 1
99 %2:fpr(s32) = G_EXTRACT_VECTOR_ELT %0(<2 x s32>), %3(s64)
100 %5:gpr(s32) = COPY %2(s32)
101 %4:gpr(s64) = G_ZEXT %5(s32)
103 RET_ReallyLR implicit $x0
109 regBankSelected: true
110 tracksRegLiveness: true
115 ; CHECK-LABEL: name: si32
116 ; CHECK: liveins: $q0, $w0
117 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
118 ; CHECK: [[SMOVvi16to32_:%[0-9]+]]:gpr32 = SMOVvi16to32 [[COPY]], 1
119 ; CHECK: $w0 = COPY [[SMOVvi16to32_]]
120 ; CHECK: RET_ReallyLR implicit $w0
121 %0:fpr(<8 x s16>) = COPY $q0
122 %4:gpr(s64) = G_CONSTANT i64 1
123 %3:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %4(s64)
124 %6:gpr(s16) = COPY %3(s16)
125 %5:gpr(s32) = G_SEXT %6(s16)
127 RET_ReallyLR implicit $w0
133 regBankSelected: true
134 tracksRegLiveness: true
139 ; CHECK-LABEL: name: zi32
140 ; CHECK: liveins: $q0, $w0
141 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
142 ; CHECK: [[UMOVvi16_:%[0-9]+]]:gpr32 = UMOVvi16 [[COPY]], 1
143 ; CHECK: $w0 = COPY [[UMOVvi16_]]
144 ; CHECK: RET_ReallyLR implicit $w0
145 %0:fpr(<8 x s16>) = COPY $q0
146 %4:gpr(s64) = G_CONSTANT i64 1
147 %3:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<8 x s16>), %4(s64)
148 %6:gpr(s16) = COPY %3(s16)
149 %5:gpr(s32) = G_ZEXT %6(s16)
151 RET_ReallyLR implicit $w0
157 regBankSelected: true
158 tracksRegLiveness: true
163 ; CHECK-LABEL: name: si32_2
164 ; CHECK: liveins: $d0, $w0
165 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
166 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
167 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
168 ; CHECK: [[SMOVvi16to32_:%[0-9]+]]:gpr32 = SMOVvi16to32 [[INSERT_SUBREG]], 1
169 ; CHECK: $w0 = COPY [[SMOVvi16to32_]]
170 ; CHECK: RET_ReallyLR implicit $w0
171 %0:fpr(<4 x s16>) = COPY $d0
172 %4:gpr(s64) = G_CONSTANT i64 1
173 %3:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<4 x s16>), %4(s64)
174 %6:gpr(s16) = COPY %3(s16)
175 %5:gpr(s32) = G_SEXT %6(s16)
177 RET_ReallyLR implicit $w0
183 regBankSelected: true
184 tracksRegLiveness: true
189 ; CHECK-LABEL: name: zi32_2
190 ; CHECK: liveins: $d0, $w0
191 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
192 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
193 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
194 ; CHECK: [[UMOVvi16_:%[0-9]+]]:gpr32 = UMOVvi16 [[INSERT_SUBREG]], 1
195 ; CHECK: $w0 = COPY [[UMOVvi16_]]
196 ; CHECK: RET_ReallyLR implicit $w0
197 %0:fpr(<4 x s16>) = COPY $d0
198 %4:gpr(s64) = G_CONSTANT i64 1
199 %3:fpr(s16) = G_EXTRACT_VECTOR_ELT %0(<4 x s16>), %4(s64)
200 %6:gpr(s16) = COPY %3(s16)
201 %5:gpr(s32) = G_ZEXT %6(s16)
203 RET_ReallyLR implicit $w0
209 regBankSelected: true
210 tracksRegLiveness: true
215 ; CHECK-LABEL: name: si16
216 ; CHECK: liveins: $q0, $w0
217 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
218 ; CHECK: [[SMOVvi8to32_:%[0-9]+]]:gpr32 = SMOVvi8to32 [[COPY]], 1
219 ; CHECK: $w0 = COPY [[SMOVvi8to32_]]
220 ; CHECK: RET_ReallyLR implicit $w0
221 %0:fpr(<16 x s8>) = COPY $q0
222 %4:gpr(s64) = G_CONSTANT i64 1
223 %3:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<16 x s8>), %4(s64)
224 %7:gpr(s8) = COPY %3(s8)
225 %6:gpr(s32) = G_SEXT %7(s8)
227 RET_ReallyLR implicit $w0
232 regBankSelected: true
233 tracksRegLiveness: true
238 ; CHECK-LABEL: name: zi16
239 ; CHECK: liveins: $q0, $w0
240 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
241 ; CHECK: [[UMOVvi8_:%[0-9]+]]:gpr32 = UMOVvi8 [[COPY]], 1
242 ; CHECK: $w0 = COPY [[UMOVvi8_]]
243 ; CHECK: RET_ReallyLR implicit $w0
244 %0:fpr(<16 x s8>) = COPY $q0
245 %4:gpr(s64) = G_CONSTANT i64 1
246 %3:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<16 x s8>), %4(s64)
247 %7:gpr(s8) = COPY %3(s8)
248 %6:gpr(s32) = G_ZEXT %7(s8)
250 RET_ReallyLR implicit $w0
256 regBankSelected: true
257 tracksRegLiveness: true
262 ; CHECK-LABEL: name: si16_2
263 ; CHECK: liveins: $d0, $w0
264 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
265 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
266 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
267 ; CHECK: [[SMOVvi8to32_:%[0-9]+]]:gpr32 = SMOVvi8to32 [[INSERT_SUBREG]], 1
268 ; CHECK: $w0 = COPY [[SMOVvi8to32_]]
269 ; CHECK: RET_ReallyLR implicit $w0
270 %0:fpr(<8 x s8>) = COPY $d0
271 %4:gpr(s64) = G_CONSTANT i64 1
272 %3:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<8 x s8>), %4(s64)
273 %7:gpr(s8) = COPY %3(s8)
274 %6:gpr(s32) = G_SEXT %7(s8)
276 RET_ReallyLR implicit $w0
281 regBankSelected: true
282 tracksRegLiveness: true
287 ; CHECK-LABEL: name: zi16_2
288 ; CHECK: liveins: $d0, $w0
289 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
290 ; CHECK: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
291 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:fpr128 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.dsub
292 ; CHECK: [[UMOVvi8_:%[0-9]+]]:gpr32 = UMOVvi8 [[INSERT_SUBREG]], 1
293 ; CHECK: $w0 = COPY [[UMOVvi8_]]
294 ; CHECK: RET_ReallyLR implicit $w0
295 %0:fpr(<8 x s8>) = COPY $d0
296 %4:gpr(s64) = G_CONSTANT i64 1
297 %3:fpr(s8) = G_EXTRACT_VECTOR_ELT %0(<8 x s8>), %4(s64)
298 %7:gpr(s8) = COPY %3(s8)
299 %6:gpr(s32) = G_ZEXT %7(s8)
301 RET_ReallyLR implicit $w0
305 name: skip_anyext_to_16
307 regBankSelected: true
308 tracksRegLiveness: true
311 %5:fpr(<16 x s8>) = G_IMPLICIT_DEF
312 %12:gpr(s64) = G_CONSTANT i64 0
313 %4:fpr(s8) = G_EXTRACT_VECTOR_ELT %5(<16 x s8>), %12(s64)
314 %11:gpr(s8) = COPY %4(s8)
315 %8:gpr(s16) = G_ANYEXT %11(s8)
316 %ext:gpr(s32) = G_ANYEXT %8(s16)