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
5 name: fptrunc_s16_s32_fpr
10 - { id: 0, class: fpr }
11 - { id: 1, class: fpr }
17 ; CHECK-LABEL: name: fptrunc_s16_s32_fpr
18 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
19 ; CHECK: [[FCVTHSr:%[0-9]+]]:fpr16 = FCVTHSr [[COPY]]
20 ; CHECK: $h0 = COPY [[FCVTHSr]]
22 %1(s16) = G_FPTRUNC %0
27 name: fptrunc_s16_s64_fpr
32 - { id: 0, class: fpr }
33 - { id: 1, class: fpr }
39 ; CHECK-LABEL: name: fptrunc_s16_s64_fpr
40 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
41 ; CHECK: [[FCVTHDr:%[0-9]+]]:fpr16 = FCVTHDr [[COPY]]
42 ; CHECK: $h0 = COPY [[FCVTHDr]]
44 %1(s16) = G_FPTRUNC %0
49 name: fptrunc_s32_s64_fpr
54 - { id: 0, class: fpr }
55 - { id: 1, class: fpr }
61 ; CHECK-LABEL: name: fptrunc_s32_s64_fpr
62 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
63 ; CHECK: [[FCVTSDr:%[0-9]+]]:fpr32 = FCVTSDr [[COPY]]
64 ; CHECK: $s0 = COPY [[FCVTSDr]]
66 %1(s32) = G_FPTRUNC %0
71 name: fptrunc_v4s16_v4s32_fpr
76 - { id: 0, class: fpr }
77 - { id: 1, class: fpr }
82 ; CHECK-LABEL: name: fptrunc_v4s16_v4s32_fpr
83 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
84 ; CHECK: [[FCVTNv4i16:%[0-9]+]]:fpr64 = FCVTNv4i16 [[COPY]]
85 ; CHECK: $d0 = COPY [[FCVTNv4i16]]
86 %0(<4 x s32>) = COPY $q0
87 %1(<4 x s16>) = G_FPTRUNC %0
88 $d0 = COPY %1(<4 x s16>)
92 name: fptrunc_v2s32_v2s64_fpr
97 - { id: 0, class: fpr }
98 - { id: 1, class: fpr }
103 ; CHECK-LABEL: name: fptrunc_v2s32_v2s64_fpr
104 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
105 ; CHECK: [[FCVTNv2i32:%[0-9]+]]:fpr64 = FCVTNv2i32 [[COPY]]
106 ; CHECK: $d0 = COPY [[FCVTNv2i32]]
107 %0(<2 x s64>) = COPY $q0
108 %1(<2 x s32>) = G_FPTRUNC %0
109 $d0 = COPY %1(<2 x s32>)
113 name: fpext_s32_s16_fpr
115 regBankSelected: true
118 - { id: 0, class: fpr }
119 - { id: 1, class: fpr }
125 ; CHECK-LABEL: name: fpext_s32_s16_fpr
126 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
127 ; CHECK: [[FCVTSHr:%[0-9]+]]:fpr32 = FCVTSHr [[COPY]]
128 ; CHECK: $s0 = COPY [[FCVTSHr]]
135 name: fpext_s64_s16_fpr
137 regBankSelected: true
140 - { id: 0, class: fpr }
141 - { id: 1, class: fpr }
147 ; CHECK-LABEL: name: fpext_s64_s16_fpr
148 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
149 ; CHECK: [[FCVTDHr:%[0-9]+]]:fpr64 = FCVTDHr [[COPY]]
150 ; CHECK: $d0 = COPY [[FCVTDHr]]
157 name: fpext_s64_s32_fpr
159 regBankSelected: true
162 - { id: 0, class: fpr }
163 - { id: 1, class: fpr }
169 ; CHECK-LABEL: name: fpext_s64_s32_fpr
170 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
171 ; CHECK: [[FCVTDSr:%[0-9]+]]:fpr64 = FCVTDSr [[COPY]]
172 ; CHECK: $d0 = COPY [[FCVTDSr]]
179 name: fpext_v4s32_v4s16_fpr
181 regBankSelected: true
184 - { id: 0, class: fpr }
185 - { id: 1, class: fpr }
190 ; CHECK-LABEL: name: fpext_v4s32_v4s16_fpr
191 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
192 ; CHECK: [[FCVTLv4i16:%[0-9]+]]:fpr128 = FCVTLv4i16 [[COPY]]
193 ; CHECK: $q0 = COPY [[FCVTLv4i16]]
194 %0(<4 x s16>) = COPY $d0
195 %1(<4 x s32>) = G_FPEXT %0
196 $q0 = COPY %1(<4 x s32>)
200 name: fpext_v2s64_v2s32_fpr
202 regBankSelected: true
205 - { id: 0, class: fpr }
206 - { id: 1, class: fpr }
211 ; CHECK-LABEL: name: fpext_v2s64_v2s32_fpr
212 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
213 ; CHECK: [[FCVTLv2i32:%[0-9]+]]:fpr128 = FCVTLv2i32 [[COPY]]
214 ; CHECK: $q0 = COPY [[FCVTLv2i32]]
215 %0(<2 x s32>) = COPY $d0
216 %1(<2 x s64>) = G_FPEXT %0
217 $q0 = COPY %1(<2 x s64>)
221 name: sitofp_s32_s32_fpr
223 regBankSelected: true
226 - { id: 0, class: gpr }
227 - { id: 1, class: fpr }
233 ; CHECK-LABEL: name: sitofp_s32_s32_fpr
234 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
235 ; CHECK: [[SCVTFUWSri:%[0-9]+]]:fpr32 = SCVTFUWSri [[COPY]]
236 ; CHECK: $s0 = COPY [[SCVTFUWSri]]
238 %1(s32) = G_SITOFP %0
243 name: sitofp_s32_s64_fpr
245 regBankSelected: true
248 - { id: 0, class: gpr }
249 - { id: 1, class: fpr }
255 ; CHECK-LABEL: name: sitofp_s32_s64_fpr
256 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
257 ; CHECK: [[SCVTFUXSri:%[0-9]+]]:fpr32 = SCVTFUXSri [[COPY]]
258 ; CHECK: $s0 = COPY [[SCVTFUXSri]]
260 %1(s32) = G_SITOFP %0
265 name: sitofp_s64_s32_fpr
267 regBankSelected: true
270 - { id: 0, class: gpr }
271 - { id: 1, class: fpr }
277 ; CHECK-LABEL: name: sitofp_s64_s32_fpr
278 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
279 ; CHECK: [[SCVTFUWDri:%[0-9]+]]:fpr64 = SCVTFUWDri [[COPY]]
280 ; CHECK: $d0 = COPY [[SCVTFUWDri]]
282 %1(s64) = G_SITOFP %0
287 name: sitofp_s64_s64_fpr
289 regBankSelected: true
292 - { id: 0, class: gpr }
293 - { id: 1, class: fpr }
299 ; CHECK-LABEL: name: sitofp_s64_s64_fpr
300 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
301 ; CHECK: [[SCVTFUXDri:%[0-9]+]]:fpr64 = SCVTFUXDri [[COPY]]
302 ; CHECK: $d0 = COPY [[SCVTFUXDri]]
304 %1(s64) = G_SITOFP %0
309 name: uitofp_s32_s32_fpr
311 regBankSelected: true
314 - { id: 0, class: gpr }
315 - { id: 1, class: fpr }
321 ; CHECK-LABEL: name: uitofp_s32_s32_fpr
322 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
323 ; CHECK: [[UCVTFUWSri:%[0-9]+]]:fpr32 = UCVTFUWSri [[COPY]]
324 ; CHECK: $s0 = COPY [[UCVTFUWSri]]
326 %1(s32) = G_UITOFP %0
331 name: uitofp_s32_s64_fpr
333 regBankSelected: true
336 - { id: 0, class: gpr }
337 - { id: 1, class: fpr }
343 ; CHECK-LABEL: name: uitofp_s32_s64_fpr
344 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
345 ; CHECK: [[UCVTFUXSri:%[0-9]+]]:fpr32 = UCVTFUXSri [[COPY]]
346 ; CHECK: $s0 = COPY [[UCVTFUXSri]]
348 %1(s32) = G_UITOFP %0
353 name: uitofp_s64_s32_fpr
355 regBankSelected: true
358 - { id: 0, class: gpr }
359 - { id: 1, class: fpr }
365 ; CHECK-LABEL: name: uitofp_s64_s32_fpr
366 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
367 ; CHECK: [[UCVTFUWDri:%[0-9]+]]:fpr64 = UCVTFUWDri [[COPY]]
368 ; CHECK: $d0 = COPY [[UCVTFUWDri]]
370 %1(s64) = G_UITOFP %0
375 name: uitofp_s64_s64_fpr
377 regBankSelected: true
380 - { id: 0, class: gpr }
381 - { id: 1, class: fpr }
387 ; CHECK-LABEL: name: uitofp_s64_s64_fpr
388 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
389 ; CHECK: [[UCVTFUXDri:%[0-9]+]]:fpr64 = UCVTFUXDri [[COPY]]
390 ; CHECK: $d0 = COPY [[UCVTFUXDri]]
392 %1(s64) = G_UITOFP %0
397 name: fptosi_s32_s32_gpr
399 regBankSelected: true
402 - { id: 0, class: fpr }
403 - { id: 1, class: gpr }
409 ; CHECK-LABEL: name: fptosi_s32_s32_gpr
410 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
411 ; CHECK: [[FCVTZSUWSr:%[0-9]+]]:gpr32 = FCVTZSUWSr [[COPY]]
412 ; CHECK: $w0 = COPY [[FCVTZSUWSr]]
414 %1(s32) = G_FPTOSI %0
419 name: fptosi_s32_s64_gpr
421 regBankSelected: true
424 - { id: 0, class: fpr }
425 - { id: 1, class: gpr }
431 ; CHECK-LABEL: name: fptosi_s32_s64_gpr
432 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
433 ; CHECK: [[FCVTZSUWDr:%[0-9]+]]:gpr32 = FCVTZSUWDr [[COPY]]
434 ; CHECK: $w0 = COPY [[FCVTZSUWDr]]
436 %1(s32) = G_FPTOSI %0
441 name: fptosi_s64_s32_gpr
443 regBankSelected: true
446 - { id: 0, class: fpr }
447 - { id: 1, class: gpr }
453 ; CHECK-LABEL: name: fptosi_s64_s32_gpr
454 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
455 ; CHECK: [[FCVTZSUXSr:%[0-9]+]]:gpr64 = FCVTZSUXSr [[COPY]]
456 ; CHECK: $x0 = COPY [[FCVTZSUXSr]]
458 %1(s64) = G_FPTOSI %0
463 name: fptosi_s64_s64_gpr
465 regBankSelected: true
468 - { id: 0, class: fpr }
469 - { id: 1, class: gpr }
475 ; CHECK-LABEL: name: fptosi_s64_s64_gpr
476 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
477 ; CHECK: [[FCVTZSUXDr:%[0-9]+]]:gpr64 = FCVTZSUXDr [[COPY]]
478 ; CHECK: $x0 = COPY [[FCVTZSUXDr]]
480 %1(s64) = G_FPTOSI %0
485 name: fptoui_s32_s32_gpr
487 regBankSelected: true
490 - { id: 0, class: fpr }
491 - { id: 1, class: gpr }
497 ; CHECK-LABEL: name: fptoui_s32_s32_gpr
498 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
499 ; CHECK: [[FCVTZUUWSr:%[0-9]+]]:gpr32 = FCVTZUUWSr [[COPY]]
500 ; CHECK: $w0 = COPY [[FCVTZUUWSr]]
502 %1(s32) = G_FPTOUI %0
507 name: fptoui_s32_s64_gpr
509 regBankSelected: true
512 - { id: 0, class: fpr }
513 - { id: 1, class: gpr }
519 ; CHECK-LABEL: name: fptoui_s32_s64_gpr
520 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
521 ; CHECK: [[FCVTZUUWDr:%[0-9]+]]:gpr32 = FCVTZUUWDr [[COPY]]
522 ; CHECK: $w0 = COPY [[FCVTZUUWDr]]
524 %1(s32) = G_FPTOUI %0
529 name: fptoui_s64_s32_gpr
531 regBankSelected: true
534 - { id: 0, class: fpr }
535 - { id: 1, class: gpr }
541 ; CHECK-LABEL: name: fptoui_s64_s32_gpr
542 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
543 ; CHECK: [[FCVTZUUXSr:%[0-9]+]]:gpr64 = FCVTZUUXSr [[COPY]]
544 ; CHECK: $x0 = COPY [[FCVTZUUXSr]]
546 %1(s64) = G_FPTOUI %0
551 name: fptoui_s64_s64_gpr
553 regBankSelected: true
556 - { id: 0, class: fpr }
557 - { id: 1, class: gpr }
563 ; CHECK-LABEL: name: fptoui_s64_s64_gpr
564 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
565 ; CHECK: [[FCVTZUUXDr:%[0-9]+]]:gpr64 = FCVTZUUXDr [[COPY]]
566 ; CHECK: $x0 = COPY [[FCVTZUUXDr]]
568 %1(s64) = G_FPTOUI %0