1 # RUN: llc -O0 -mtriple arm-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
3 define void @test_trunc_and_zext_s1() { ret void }
4 define void @test_trunc_and_sext_s1() { ret void }
5 define void @test_trunc_and_sext_s8() { ret void }
6 define void @test_trunc_and_zext_s16() { ret void }
7 define void @test_trunc_and_anyext_s8() { ret void }
8 define void @test_trunc_and_anyext_s16() { ret void }
9 define void @test_trunc_s64() #0 { ret void }
11 define void @test_add_s32() { ret void }
12 define void @test_add_fold_imm_s32() { ret void }
13 define void @test_add_no_fold_imm_s32() #3 { ret void }
15 define void @test_fadd_s32() #0 { ret void }
16 define void @test_fadd_s64() #0 { ret void }
18 define void @test_fsub_s32() #0 { ret void }
19 define void @test_fsub_s64() #0 { ret void }
21 define void @test_fmul_s32() #0 { ret void }
22 define void @test_fmul_s64() #0 { ret void }
24 define void @test_fdiv_s32() #0 { ret void }
25 define void @test_fdiv_s64() #0 { ret void }
27 define void @test_fneg_s32() #0 { ret void }
28 define void @test_fneg_s64() #0 { ret void }
30 define void @test_fma_s32() #4 { ret void }
31 define void @test_fma_s64() #4 { ret void }
33 define void @test_fpext_s32_to_s64() #0 { ret void }
34 define void @test_fptrunc_s64_to_s32() #0 {ret void }
36 define void @test_fptosi_s32() #0 { ret void }
37 define void @test_fptosi_s64() #0 { ret void }
38 define void @test_fptoui_s32() #0 { ret void }
39 define void @test_fptoui_s64() #0 { ret void }
41 define void @test_sitofp_s32() #0 { ret void }
42 define void @test_sitofp_s64() #0 { ret void }
43 define void @test_uitofp_s32() #0 { ret void }
44 define void @test_uitofp_s64() #0 { ret void }
46 define void @test_sub_s32() { ret void }
47 define void @test_sub_imm_s32() { ret void }
48 define void @test_sub_rev_imm_s32() { ret void }
50 define void @test_mul_s32() #1 { ret void }
51 define void @test_mulv5_s32() { ret void }
53 define void @test_sdiv_s32() #2 { ret void }
54 define void @test_udiv_s32() #2 { ret void }
56 define void @test_lshr_s32() { ret void }
57 define void @test_ashr_s32() { ret void }
58 define void @test_shl_s32() { ret void }
60 define void @test_load_from_stack() { ret void }
61 define void @test_load_f32() #0 { ret void }
62 define void @test_load_f64() #0 { ret void }
64 define void @test_stores() #0 { ret void }
66 define void @test_gep() { ret void }
68 define void @test_MOVi32imm() #3 { ret void }
70 define void @test_constant_imm() { ret void }
71 define void @test_constant_cimm() { ret void }
73 define void @test_pointer_constant_unconstrained() { ret void }
74 define void @test_pointer_constant_constrained() { ret void }
76 define void @test_inttoptr_s32() { ret void }
77 define void @test_ptrtoint_s32() { ret void }
79 define void @test_select_s32() { ret void }
80 define void @test_select_ptr() { ret void }
82 define void @test_br() { ret void }
84 define void @test_phi_s32() { ret void }
85 define void @test_phi_s64() #0 { ret void }
87 define void @test_soft_fp_double() #0 { ret void }
89 attributes #0 = { "target-features"="+vfp2,-neonfp" }
90 attributes #1 = { "target-features"="+v6" }
91 attributes #2 = { "target-features"="+hwdiv-arm" }
92 attributes #3 = { "target-features"="+v6t2" }
93 attributes #4 = { "target-features"="+vfp4,-neonfp" }
96 name: test_trunc_and_zext_s1
97 # CHECK-LABEL: name: test_trunc_and_zext_s1
101 # CHECK: selected: true
103 - { id: 0, class: gprb }
104 - { id: 1, class: gprb }
105 - { id: 2, class: gprb }
111 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
113 %1(s1) = G_TRUNC %0(s32)
115 %2(s32) = G_ZEXT %1(s1)
116 ; CHECK: [[VREGEXT:%[0-9]+]]:gpr = ANDri [[VREG]], 1, 14, $noreg, $noreg
119 ; CHECK: $r0 = COPY [[VREGEXT]]
121 BX_RET 14, $noreg, implicit $r0
122 ; CHECK: BX_RET 14, $noreg, implicit $r0
125 name: test_trunc_and_sext_s1
126 # CHECK-LABEL: name: test_trunc_and_sext_s1
128 regBankSelected: true
130 # CHECK: selected: true
132 - { id: 0, class: gprb }
133 - { id: 1, class: gprb }
134 - { id: 2, class: gprb }
140 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
142 %1(s1) = G_TRUNC %0(s32)
144 %2(s32) = G_SEXT %1(s1)
145 ; CHECK: [[VREGAND:%[0-9]+]]:gpr = ANDri [[VREG]], 1, 14, $noreg, $noreg
146 ; CHECK: [[VREGEXT:%[0-9]+]]:gpr = RSBri [[VREGAND]], 0, 14, $noreg, $noreg
149 ; CHECK: $r0 = COPY [[VREGEXT]]
151 BX_RET 14, $noreg, implicit $r0
152 ; CHECK: BX_RET 14, $noreg, implicit $r0
155 name: test_trunc_and_sext_s8
156 # CHECK-LABEL: name: test_trunc_and_sext_s8
158 regBankSelected: true
160 # CHECK: selected: true
162 - { id: 0, class: gprb }
163 - { id: 1, class: gprb }
164 - { id: 2, class: gprb }
170 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
172 %1(s8) = G_TRUNC %0(s32)
173 ; CHECK: [[VREGTRUNC:%[0-9]+]]:gprnopc = COPY [[VREG]]
175 %2(s32) = G_SEXT %1(s8)
176 ; CHECK: [[VREGEXT:%[0-9]+]]:gprnopc = SXTB [[VREGTRUNC]], 0, 14, $noreg
179 ; CHECK: $r0 = COPY [[VREGEXT]]
181 BX_RET 14, $noreg, implicit $r0
182 ; CHECK: BX_RET 14, $noreg, implicit $r0
185 name: test_trunc_and_zext_s16
186 # CHECK-LABEL: name: test_trunc_and_zext_s16
188 regBankSelected: true
190 # CHECK: selected: true
192 - { id: 0, class: gprb }
193 - { id: 1, class: gprb }
194 - { id: 2, class: gprb }
200 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
202 %1(s16) = G_TRUNC %0(s32)
203 ; CHECK: [[VREGTRUNC:%[0-9]+]]:gprnopc = COPY [[VREG]]
205 %2(s32) = G_ZEXT %1(s16)
206 ; CHECK: [[VREGEXT:%[0-9]+]]:gprnopc = UXTH [[VREGTRUNC]], 0, 14, $noreg
209 ; CHECK: $r0 = COPY [[VREGEXT]]
211 BX_RET 14, $noreg, implicit $r0
212 ; CHECK: BX_RET 14, $noreg, implicit $r0
215 name: test_trunc_and_anyext_s8
216 # CHECK-LABEL: name: test_trunc_and_anyext_s8
218 regBankSelected: true
220 # CHECK: selected: true
222 - { id: 0, class: gprb }
223 - { id: 1, class: gprb }
224 - { id: 2, class: gprb }
230 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
232 %1(s8) = G_TRUNC %0(s32)
234 %2(s32) = G_ANYEXT %1(s8)
237 ; CHECK: $r0 = COPY [[VREG]]
239 BX_RET 14, $noreg, implicit $r0
240 ; CHECK: BX_RET 14, $noreg, implicit $r0
243 name: test_trunc_and_anyext_s16
244 # CHECK-LABEL: name: test_trunc_and_anyext_s16
246 regBankSelected: true
248 # CHECK: selected: true
250 - { id: 0, class: gprb }
251 - { id: 1, class: gprb }
252 - { id: 2, class: gprb }
258 ; CHECK: [[VREG:%[0-9]+]]:gpr = COPY $r0
260 %1(s16) = G_TRUNC %0(s32)
262 %2(s32) = G_ANYEXT %1(s16)
265 ; CHECK: $r0 = COPY [[VREG]]
267 BX_RET 14, $noreg, implicit $r0
268 ; CHECK: BX_RET 14, $noreg, implicit $r0
272 # CHECK-LABEL: name: test_trunc_s64
274 regBankSelected: true
276 # CHECK: selected: true
278 - { id: 0, class: fprb }
279 - { id: 1, class: gprb }
280 - { id: 2, class: gprb }
286 ; CHECK: [[VREG:%[0-9]+]]:dpr = COPY $d0
289 ; CHECK: [[PTR:%[0-9]+]]:gpr = COPY $r0
291 %1(s32) = G_TRUNC %0(s64)
292 ; CHECK: [[VREGTRUNC:%[0-9]+]]:gpr, [[UNINTERESTING:%[0-9]+]]:gpr = VMOVRRD [[VREG]]
294 G_STORE %1(s32), %2 :: (store 4)
295 ; CHECK: STRi12 [[VREGTRUNC]], [[PTR]], 0, 14, $noreg
298 ; CHECK: BX_RET 14, $noreg
302 # CHECK-LABEL: name: test_add_s32
304 regBankSelected: true
306 # CHECK: selected: true
308 - { id: 0, class: gprb }
309 - { id: 1, class: gprb }
310 - { id: 2, class: gprb }
316 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
319 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
321 %2(s32) = G_ADD %0, %1
322 ; CHECK: [[VREGSUM:%[0-9]+]]:gpr = ADDrr [[VREGX]], [[VREGY]], 14, $noreg, $noreg
325 ; CHECK: $r0 = COPY [[VREGSUM]]
327 BX_RET 14, $noreg, implicit $r0
328 ; CHECK: BX_RET 14, $noreg, implicit $r0
331 name: test_add_fold_imm_s32
332 # CHECK-LABEL: name: test_add_fold_imm_s32
334 regBankSelected: true
336 # CHECK: selected: true
338 - { id: 0, class: gprb }
339 - { id: 1, class: gprb }
340 - { id: 2, class: gprb }
346 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
348 %1(s32) = G_CONSTANT i32 255
349 %2(s32) = G_ADD %0, %1
350 ; CHECK: [[VREGSUM:%[0-9]+]]:gpr = ADDri [[VREGX]], 255, 14, $noreg, $noreg
353 ; CHECK: $r0 = COPY [[VREGSUM]]
355 BX_RET 14, $noreg, implicit $r0
356 ; CHECK: BX_RET 14, $noreg, implicit $r0
359 name: test_add_no_fold_imm_s32
360 # CHECK-LABEL: name: test_add_no_fold_imm_s32
362 regBankSelected: true
364 # CHECK: selected: true
366 - { id: 0, class: gprb }
367 - { id: 1, class: gprb }
368 - { id: 2, class: gprb }
374 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
376 %1(s32) = G_CONSTANT i32 65535
377 ; CHECK: [[VREGY:%[0-9]+]]:gpr = MOVi16 65535, 14, $noreg
379 %2(s32) = G_ADD %0, %1
380 ; CHECK: [[VREGSUM:%[0-9]+]]:gpr = ADDrr [[VREGX]], [[VREGY]], 14, $noreg, $noreg
383 ; CHECK: $r0 = COPY [[VREGSUM]]
385 BX_RET 14, $noreg, implicit $r0
386 ; CHECK: BX_RET 14, $noreg, implicit $r0
390 # CHECK-LABEL: name: test_fadd_s32
392 regBankSelected: true
394 # CHECK: selected: true
396 - { id: 0, class: fprb }
397 - { id: 1, class: fprb }
398 - { id: 2, class: fprb }
404 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
407 ; CHECK: [[VREGY:%[0-9]+]]:spr = COPY $s1
409 %2(s32) = G_FADD %0, %1
410 ; CHECK: [[VREGSUM:%[0-9]+]]:spr = VADDS [[VREGX]], [[VREGY]], 14, $noreg
413 ; CHECK: $s0 = COPY [[VREGSUM]]
415 BX_RET 14, $noreg, implicit $s0
416 ; CHECK: BX_RET 14, $noreg, implicit $s0
420 # CHECK-LABEL: name: test_fadd_s64
422 regBankSelected: true
424 # CHECK: selected: true
426 - { id: 0, class: fprb }
427 - { id: 1, class: fprb }
428 - { id: 2, class: fprb }
434 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
437 ; CHECK: [[VREGY:%[0-9]+]]:dpr = COPY $d1
439 %2(s64) = G_FADD %0, %1
440 ; CHECK: [[VREGSUM:%[0-9]+]]:dpr = VADDD [[VREGX]], [[VREGY]], 14, $noreg
443 ; CHECK: $d0 = COPY [[VREGSUM]]
445 BX_RET 14, $noreg, implicit $d0
446 ; CHECK: BX_RET 14, $noreg, implicit $d0
450 # CHECK-LABEL: name: test_fsub_s32
452 regBankSelected: true
454 # CHECK: selected: true
456 - { id: 0, class: fprb }
457 - { id: 1, class: fprb }
458 - { id: 2, class: fprb }
464 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
467 ; CHECK: [[VREGY:%[0-9]+]]:spr = COPY $s1
469 %2(s32) = G_FSUB %0, %1
470 ; CHECK: [[VREGSUM:%[0-9]+]]:spr = VSUBS [[VREGX]], [[VREGY]], 14, $noreg
473 ; CHECK: $s0 = COPY [[VREGSUM]]
475 BX_RET 14, $noreg, implicit $s0
476 ; CHECK: BX_RET 14, $noreg, implicit $s0
480 # CHECK-LABEL: name: test_fsub_s64
482 regBankSelected: true
484 # CHECK: selected: true
486 - { id: 0, class: fprb }
487 - { id: 1, class: fprb }
488 - { id: 2, class: fprb }
494 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
497 ; CHECK: [[VREGY:%[0-9]+]]:dpr = COPY $d1
499 %2(s64) = G_FSUB %0, %1
500 ; CHECK: [[VREGSUM:%[0-9]+]]:dpr = VSUBD [[VREGX]], [[VREGY]], 14, $noreg
503 ; CHECK: $d0 = COPY [[VREGSUM]]
505 BX_RET 14, $noreg, implicit $d0
506 ; CHECK: BX_RET 14, $noreg, implicit $d0
510 # CHECK-LABEL: name: test_fmul_s32
512 regBankSelected: true
514 # CHECK: selected: true
516 - { id: 0, class: fprb }
517 - { id: 1, class: fprb }
518 - { id: 2, class: fprb }
524 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
527 ; CHECK: [[VREGY:%[0-9]+]]:spr = COPY $s1
529 %2(s32) = G_FMUL %0, %1
530 ; CHECK: [[VREGSUM:%[0-9]+]]:spr = VMULS [[VREGX]], [[VREGY]], 14, $noreg
533 ; CHECK: $s0 = COPY [[VREGSUM]]
535 BX_RET 14, $noreg, implicit $s0
536 ; CHECK: BX_RET 14, $noreg, implicit $s0
540 # CHECK-LABEL: name: test_fmul_s64
542 regBankSelected: true
544 # CHECK: selected: true
546 - { id: 0, class: fprb }
547 - { id: 1, class: fprb }
548 - { id: 2, class: fprb }
554 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
557 ; CHECK: [[VREGY:%[0-9]+]]:dpr = COPY $d1
559 %2(s64) = G_FMUL %0, %1
560 ; CHECK: [[VREGSUM:%[0-9]+]]:dpr = VMULD [[VREGX]], [[VREGY]], 14, $noreg
563 ; CHECK: $d0 = COPY [[VREGSUM]]
565 BX_RET 14, $noreg, implicit $d0
566 ; CHECK: BX_RET 14, $noreg, implicit $d0
570 # CHECK-LABEL: name: test_fdiv_s32
572 regBankSelected: true
574 # CHECK: selected: true
576 - { id: 0, class: fprb }
577 - { id: 1, class: fprb }
578 - { id: 2, class: fprb }
584 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
587 ; CHECK: [[VREGY:%[0-9]+]]:spr = COPY $s1
589 %2(s32) = G_FDIV %0, %1
590 ; CHECK: [[VREGSUM:%[0-9]+]]:spr = VDIVS [[VREGX]], [[VREGY]], 14, $noreg
593 ; CHECK: $s0 = COPY [[VREGSUM]]
595 BX_RET 14, $noreg, implicit $s0
596 ; CHECK: BX_RET 14, $noreg, implicit $s0
600 # CHECK-LABEL: name: test_fdiv_s64
602 regBankSelected: true
604 # CHECK: selected: true
606 - { id: 0, class: fprb }
607 - { id: 1, class: fprb }
608 - { id: 2, class: fprb }
614 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
617 ; CHECK: [[VREGY:%[0-9]+]]:dpr = COPY $d1
619 %2(s64) = G_FDIV %0, %1
620 ; CHECK: [[VREGSUM:%[0-9]+]]:dpr = VDIVD [[VREGX]], [[VREGY]], 14, $noreg
623 ; CHECK: $d0 = COPY [[VREGSUM]]
625 BX_RET 14, $noreg, implicit $d0
626 ; CHECK: BX_RET 14, $noreg, implicit $d0
630 # CHECK-LABEL: name: test_fneg_s32
632 regBankSelected: true
634 # CHECK: selected: true
636 - { id: 0, class: fprb }
637 - { id: 1, class: fprb }
643 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
646 ; CHECK: [[VREGSUM:%[0-9]+]]:spr = VNEGS [[VREGX]], 14, $noreg
649 ; CHECK: $s0 = COPY [[VREGSUM]]
651 BX_RET 14, $noreg, implicit $s0
652 ; CHECK: BX_RET 14, $noreg, implicit $s0
656 # CHECK-LABEL: name: test_fneg_s64
658 regBankSelected: true
660 # CHECK: selected: true
662 - { id: 0, class: fprb }
663 - { id: 1, class: fprb }
664 - { id: 2, class: fprb }
670 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
673 ; CHECK: [[VREGSUM:%[0-9]+]]:dpr = VNEGD [[VREGX]], 14, $noreg
676 ; CHECK: $d0 = COPY [[VREGSUM]]
678 BX_RET 14, $noreg, implicit $d0
679 ; CHECK: BX_RET 14, $noreg, implicit $d0
683 # CHECK-LABEL: name: test_fma_s32
685 regBankSelected: true
687 # CHECK: selected: true
689 - { id: 0, class: fprb }
690 - { id: 1, class: fprb }
691 - { id: 2, class: fprb }
692 - { id: 3, class: fprb }
695 liveins: $s0, $s1, $s2
698 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
701 ; CHECK: [[VREGY:%[0-9]+]]:spr = COPY $s1
704 ; CHECK: [[VREGZ:%[0-9]+]]:spr = COPY $s2
706 %3(s32) = G_FMA %0, %1, %2
707 ; CHECK: [[VREGR:%[0-9]+]]:spr = VFMAS [[VREGZ]], [[VREGX]], [[VREGY]], 14, $noreg
710 ; CHECK: $s0 = COPY [[VREGR]]
712 BX_RET 14, $noreg, implicit $s0
713 ; CHECK: BX_RET 14, $noreg, implicit $s0
717 # CHECK-LABEL: name: test_fma_s64
719 regBankSelected: true
721 # CHECK: selected: true
723 - { id: 0, class: fprb }
724 - { id: 1, class: fprb }
725 - { id: 2, class: fprb }
726 - { id: 3, class: fprb }
729 liveins: $d0, $d1, $d2
732 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
735 ; CHECK: [[VREGY:%[0-9]+]]:dpr = COPY $d1
738 ; CHECK: [[VREGZ:%[0-9]+]]:dpr = COPY $d2
740 %3(s64) = G_FMA %0, %1, %2
741 ; CHECK: [[VREGR:%[0-9]+]]:dpr = VFMAD [[VREGZ]], [[VREGX]], [[VREGY]], 14, $noreg
744 ; CHECK: $d0 = COPY [[VREGR]]
746 BX_RET 14, $noreg, implicit $d0
747 ; CHECK: BX_RET 14, $noreg, implicit $d0
750 name: test_fpext_s32_to_s64
751 # CHECK-LABEL: name: test_fpext_s32_to_s64
753 regBankSelected: true
755 # CHECK: selected: true
757 - { id: 0, class: fprb }
758 - { id: 1, class: fprb }
764 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
766 %1(s64) = G_FPEXT %0(s32)
767 ; CHECK: [[VREGR:%[0-9]+]]:dpr = VCVTDS [[VREGX]], 14, $noreg
770 ; CHECK: $d0 = COPY [[VREGR]]
772 BX_RET 14, $noreg, implicit $d0
773 ; CHECK: BX_RET 14, $noreg, implicit $d0
776 name: test_fptrunc_s64_to_s32
777 # CHECK-LABEL: name: test_fptrunc_s64_to_s32
779 regBankSelected: true
781 # CHECK: selected: true
783 - { id: 0, class: fprb }
784 - { id: 1, class: fprb }
790 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
792 %1(s32) = G_FPTRUNC %0(s64)
793 ; CHECK: [[VREGR:%[0-9]+]]:spr = VCVTSD [[VREGX]], 14, $noreg
796 ; CHECK: $s0 = COPY [[VREGR]]
798 BX_RET 14, $noreg, implicit $s0
799 ; CHECK: BX_RET 14, $noreg, implicit $s0
802 name: test_fptosi_s32
803 # CHECK-LABEL: name: test_fptosi_s32
805 regBankSelected: true
807 # CHECK: selected: true
809 - { id: 0, class: fprb }
810 - { id: 1, class: gprb }
816 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
818 %1(s32) = G_FPTOSI %0(s32)
819 ; CHECK: [[VREGI:%[0-9]+]]:spr = VTOSIZS [[VREGX]], 14, $noreg
820 ; CHECK: [[VREGR:%[0-9]+]]:gpr = COPY [[VREGI]]
823 ; CHECK: $r0 = COPY [[VREGR]]
825 BX_RET 14, $noreg, implicit $r0
826 ; CHECK: BX_RET 14, $noreg, implicit $r0
829 name: test_fptosi_s64
830 # CHECK-LABEL: name: test_fptosi_s64
832 regBankSelected: true
834 # CHECK: selected: true
836 - { id: 0, class: fprb }
837 - { id: 1, class: gprb }
843 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
845 %1(s32) = G_FPTOSI %0(s64)
846 ; CHECK: [[VREGI:%[0-9]+]]:spr = VTOSIZD [[VREGX]], 14, $noreg
847 ; CHECK: [[VREGR:%[0-9]+]]:gpr = COPY [[VREGI]]
850 ; CHECK: $r0 = COPY [[VREGR]]
852 BX_RET 14, $noreg, implicit $r0
853 ; CHECK: BX_RET 14, $noreg, implicit $r0
856 name: test_fptoui_s32
857 # CHECK-LABEL: name: test_fptoui_s32
859 regBankSelected: true
861 # CHECK: selected: true
863 - { id: 0, class: fprb }
864 - { id: 1, class: gprb }
870 ; CHECK: [[VREGX:%[0-9]+]]:spr = COPY $s0
872 %1(s32) = G_FPTOUI %0(s32)
873 ; CHECK: [[VREGI:%[0-9]+]]:spr = VTOUIZS [[VREGX]], 14, $noreg
874 ; CHECK: [[VREGR:%[0-9]+]]:gpr = COPY [[VREGI]]
877 ; CHECK: $r0 = COPY [[VREGR]]
879 BX_RET 14, $noreg, implicit $r0
880 ; CHECK: BX_RET 14, $noreg, implicit $r0
883 name: test_fptoui_s64
884 # CHECK-LABEL: name: test_fptoui_s64
886 regBankSelected: true
888 # CHECK: selected: true
890 - { id: 0, class: fprb }
891 - { id: 1, class: gprb }
897 ; CHECK: [[VREGX:%[0-9]+]]:dpr = COPY $d0
899 %1(s32) = G_FPTOUI %0(s64)
900 ; CHECK: [[VREGI:%[0-9]+]]:spr = VTOUIZD [[VREGX]], 14, $noreg
901 ; CHECK: [[VREGR:%[0-9]+]]:gpr = COPY [[VREGI]]
904 ; CHECK: $r0 = COPY [[VREGR]]
906 BX_RET 14, $noreg, implicit $r0
907 ; CHECK: BX_RET 14, $noreg, implicit $r0
910 name: test_sitofp_s32
911 # CHECK-LABEL: name: test_sitofp_s32
913 regBankSelected: true
915 # CHECK: selected: true
917 - { id: 0, class: gprb }
918 - { id: 1, class: fprb }
924 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
926 %1(s32) = G_SITOFP %0(s32)
927 ; CHECK: [[VREGF:%[0-9]+]]:spr = COPY [[VREGX]]
928 ; CHECK: [[VREGR:%[0-9]+]]:spr = VSITOS [[VREGF]], 14, $noreg
931 ; CHECK: $s0 = COPY [[VREGR]]
933 BX_RET 14, $noreg, implicit $s0
934 ; CHECK: BX_RET 14, $noreg, implicit $s0
937 name: test_sitofp_s64
938 # CHECK-LABEL: name: test_sitofp_s64
940 regBankSelected: true
942 # CHECK: selected: true
944 - { id: 0, class: gprb }
945 - { id: 1, class: fprb }
951 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
953 %1(s64) = G_SITOFP %0(s32)
954 ; CHECK: [[VREGF:%[0-9]+]]:spr = COPY [[VREGX]]
955 ; CHECK: [[VREGR:%[0-9]+]]:dpr = VSITOD [[VREGF]], 14, $noreg
958 ; CHECK: $d0 = COPY [[VREGR]]
960 BX_RET 14, $noreg, implicit $d0
961 ; CHECK: BX_RET 14, $noreg, implicit $d0
964 name: test_uitofp_s32
965 # CHECK-LABEL: name: test_uitofp_s32
967 regBankSelected: true
969 # CHECK: selected: true
971 - { id: 0, class: gprb }
972 - { id: 1, class: fprb }
978 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
980 %1(s32) = G_UITOFP %0(s32)
981 ; CHECK: [[VREGF:%[0-9]+]]:spr = COPY [[VREGX]]
982 ; CHECK: [[VREGR:%[0-9]+]]:spr = VUITOS [[VREGF]], 14, $noreg
985 ; CHECK: $s0 = COPY [[VREGR]]
987 BX_RET 14, $noreg, implicit $s0
988 ; CHECK: BX_RET 14, $noreg, implicit $s0
991 name: test_uitofp_s64
992 # CHECK-LABEL: name: test_uitofp_s64
994 regBankSelected: true
996 # CHECK: selected: true
998 - { id: 0, class: gprb }
999 - { id: 1, class: fprb }
1005 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1007 %1(s64) = G_UITOFP %0(s32)
1008 ; CHECK: [[VREGF:%[0-9]+]]:spr = COPY [[VREGX]]
1009 ; CHECK: [[VREGR:%[0-9]+]]:dpr = VUITOD [[VREGF]], 14, $noreg
1012 ; CHECK: $d0 = COPY [[VREGR]]
1014 BX_RET 14, $noreg, implicit $d0
1015 ; CHECK: BX_RET 14, $noreg, implicit $d0
1019 # CHECK-LABEL: name: test_sub_s32
1021 regBankSelected: true
1023 # CHECK: selected: true
1025 - { id: 0, class: gprb }
1026 - { id: 1, class: gprb }
1027 - { id: 2, class: gprb }
1033 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1036 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1038 %2(s32) = G_SUB %0, %1
1039 ; CHECK: [[VREGRES:%[0-9]+]]:gpr = SUBrr [[VREGX]], [[VREGY]], 14, $noreg, $noreg
1042 ; CHECK: $r0 = COPY [[VREGRES]]
1044 BX_RET 14, $noreg, implicit $r0
1045 ; CHECK: BX_RET 14, $noreg, implicit $r0
1048 name: test_sub_imm_s32
1049 # CHECK-LABEL: name: test_sub_imm_s32
1051 regBankSelected: true
1053 # CHECK: selected: true
1055 - { id: 0, class: gprb }
1056 - { id: 1, class: gprb }
1057 - { id: 2, class: gprb }
1063 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1065 %1(s32) = G_CONSTANT i32 17
1066 %2(s32) = G_SUB %0, %1
1067 ; CHECK: [[VREGRES:%[0-9]+]]:gpr = SUBri [[VREGX]], 17, 14, $noreg, $noreg
1070 ; CHECK: $r0 = COPY [[VREGRES]]
1072 BX_RET 14, $noreg, implicit $r0
1073 ; CHECK: BX_RET 14, $noreg, implicit $r0
1076 name: test_sub_rev_imm_s32
1077 # CHECK-LABEL: name: test_sub_rev_imm_s32
1079 regBankSelected: true
1081 # CHECK: selected: true
1083 - { id: 0, class: gprb }
1084 - { id: 1, class: gprb }
1085 - { id: 2, class: gprb }
1091 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1093 %1(s32) = G_CONSTANT i32 17
1094 %2(s32) = G_SUB %1, %0
1095 ; CHECK: [[VREGRES:%[0-9]+]]:gpr = RSBri [[VREGX]], 17, 14, $noreg, $noreg
1098 ; CHECK: $r0 = COPY [[VREGRES]]
1100 BX_RET 14, $noreg, implicit $r0
1101 ; CHECK: BX_RET 14, $noreg, implicit $r0
1105 # CHECK-LABEL: name: test_mul_s32
1107 regBankSelected: true
1109 # CHECK: selected: true
1111 - { id: 0, class: gprb }
1112 - { id: 1, class: gprb }
1113 - { id: 2, class: gprb }
1119 ; CHECK: [[VREGX:%[0-9]+]]:gprnopc = COPY $r0
1122 ; CHECK: [[VREGY:%[0-9]+]]:gprnopc = COPY $r1
1124 %2(s32) = G_MUL %0, %1
1125 ; CHECK: [[VREGRES:%[0-9]+]]:gprnopc = MUL [[VREGX]], [[VREGY]], 14, $noreg, $noreg
1128 ; CHECK: $r0 = COPY [[VREGRES]]
1130 BX_RET 14, $noreg, implicit $r0
1131 ; CHECK: BX_RET 14, $noreg, implicit $r0
1134 name: test_mulv5_s32
1135 # CHECK-LABEL: name: test_mulv5_s32
1137 regBankSelected: true
1139 # CHECK: selected: true
1141 - { id: 0, class: gprb }
1142 - { id: 1, class: gprb }
1143 - { id: 2, class: gprb }
1149 ; CHECK: [[VREGX:%[0-9]+]]:gprnopc = COPY $r0
1152 ; CHECK: [[VREGY:%[0-9]+]]:gprnopc = COPY $r1
1154 %2(s32) = G_MUL %0, %1
1155 ; CHECK: early-clobber [[VREGRES:%[0-9]+]]:gprnopc = MULv5 [[VREGX]], [[VREGY]], 14, $noreg, $noreg
1158 ; CHECK: $r0 = COPY [[VREGRES]]
1160 BX_RET 14, $noreg, implicit $r0
1161 ; CHECK: BX_RET 14, $noreg, implicit $r0
1165 # CHECK-LABEL: name: test_sdiv_s32
1167 regBankSelected: true
1169 # CHECK: selected: true
1171 - { id: 0, class: gprb }
1172 - { id: 1, class: gprb }
1173 - { id: 2, class: gprb }
1179 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1182 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1184 %2(s32) = G_SDIV %0, %1
1185 ; CHECK: [[VREGRES:%[0-9]+]]:gpr = SDIV [[VREGX]], [[VREGY]], 14, $noreg
1188 ; CHECK: $r0 = COPY [[VREGRES]]
1190 BX_RET 14, $noreg, implicit $r0
1191 ; CHECK: BX_RET 14, $noreg, implicit $r0
1195 # CHECK-LABEL: name: test_udiv_s32
1197 regBankSelected: true
1199 # CHECK: selected: true
1201 - { id: 0, class: gprb }
1202 - { id: 1, class: gprb }
1203 - { id: 2, class: gprb }
1209 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1212 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1214 %2(s32) = G_UDIV %0, %1
1215 ; CHECK: [[VREGRES:%[0-9]+]]:gpr = UDIV [[VREGX]], [[VREGY]], 14, $noreg
1218 ; CHECK: $r0 = COPY [[VREGRES]]
1220 BX_RET 14, $noreg, implicit $r0
1221 ; CHECK: BX_RET 14, $noreg, implicit $r0
1225 # CHECK-LABEL: name: test_lshr_s32
1227 regBankSelected: true
1229 # CHECK: selected: true
1231 - { id: 0, class: gprb }
1232 - { id: 1, class: gprb }
1233 - { id: 2, class: gprb }
1239 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1242 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1244 %2(s32) = G_LSHR %0, %1
1245 ; CHECK: [[VREGRES:%[0-9]+]]:gprnopc = MOVsr [[VREGX]], [[VREGY]], 3, 14, $noreg, $noreg
1248 ; CHECK: $r0 = COPY [[VREGRES]]
1250 BX_RET 14, $noreg, implicit $r0
1251 ; CHECK: BX_RET 14, $noreg, implicit $r0
1255 # CHECK-LABEL: name: test_ashr_s32
1257 regBankSelected: true
1259 # CHECK: selected: true
1261 - { id: 0, class: gprb }
1262 - { id: 1, class: gprb }
1263 - { id: 2, class: gprb }
1269 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1272 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1274 %2(s32) = G_ASHR %0, %1
1275 ; CHECK: [[VREGRES:%[0-9]+]]:gprnopc = MOVsr [[VREGX]], [[VREGY]], 1, 14, $noreg, $noreg
1278 ; CHECK: $r0 = COPY [[VREGRES]]
1280 BX_RET 14, $noreg, implicit $r0
1281 ; CHECK: BX_RET 14, $noreg, implicit $r0
1285 # CHECK-LABEL: name: test_shl_s32
1287 regBankSelected: true
1289 # CHECK: selected: true
1291 - { id: 0, class: gprb }
1292 - { id: 1, class: gprb }
1293 - { id: 2, class: gprb }
1299 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1302 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1304 %2(s32) = G_SHL %0, %1
1305 ; CHECK: [[VREGRES:%[0-9]+]]:gprnopc = MOVsr [[VREGX]], [[VREGY]], 2, 14, $noreg, $noreg
1308 ; CHECK: $r0 = COPY [[VREGRES]]
1310 BX_RET 14, $noreg, implicit $r0
1311 ; CHECK: BX_RET 14, $noreg, implicit $r0
1314 name: test_load_from_stack
1315 # CHECK-LABEL: name: test_load_from_stack
1317 regBankSelected: true
1319 # CHECK: selected: true
1321 - { id: 0, class: gprb }
1322 - { id: 1, class: gprb }
1323 - { id: 2, class: gprb }
1324 - { id: 3, class: gprb }
1325 - { id: 4, class: gprb }
1327 - { id: 0, offset: 0, size: 1, alignment: 4, isImmutable: true, isAliased: false }
1328 - { id: 1, offset: 4, size: 4, alignment: 4, isImmutable: true, isAliased: false }
1329 - { id: 2, offset: 8, size: 4, alignment: 4, isImmutable: true, isAliased: false }
1330 # CHECK-DAG: id: [[FI1:[0-9]+]], type: default, offset: 0, size: 1
1331 # CHECK-DAG: id: [[FI32:[0-9]+]], type: default, offset: 8
1334 liveins: $r0, $r1, $r2, $r3
1336 %0(p0) = G_FRAME_INDEX %fixed-stack.2
1337 ; CHECK: [[FI32VREG:%[0-9]+]]:gpr = ADDri %fixed-stack.[[FI32]], 0, 14, $noreg, $noreg
1339 %1(s32) = G_LOAD %0(p0) :: (load 4)
1340 ; CHECK: [[LD32VREG:%[0-9]+]]:gpr = LDRi12 [[FI32VREG]], 0, 14, $noreg
1343 ; CHECK: $r0 = COPY [[LD32VREG]]
1345 %2(p0) = G_FRAME_INDEX %fixed-stack.0
1346 ; CHECK: [[FI1VREG:%[0-9]+]]:gpr = ADDri %fixed-stack.[[FI1]], 0, 14, $noreg, $noreg
1348 %3(s1) = G_LOAD %2(p0) :: (load 1)
1349 ; CHECK: [[LD1VREG:%[0-9]+]]:gprnopc = LDRBi12 [[FI1VREG]], 0, 14, $noreg
1351 %4(s32) = G_ANYEXT %3(s1)
1352 ; CHECK: [[RES:%[0-9]+]]:gpr = COPY [[LD1VREG]]
1355 ; CHECK: $r0 = COPY [[RES]]
1358 ; CHECK: BX_RET 14, $noreg
1362 # CHECK-LABEL: name: test_load_f32
1364 regBankSelected: true
1366 # CHECK: selected: true
1368 - { id: 0, class: gprb }
1369 - { id: 1, class: fprb }
1375 ; CHECK: %[[P:[0-9]+]]:gpr = COPY $r0
1377 %1(s32) = G_LOAD %0(p0) :: (load 4)
1378 ; CHECK: %[[V:[0-9]+]]:spr = VLDRS %[[P]], 0, 14, $noreg
1381 ; CHECK: $s0 = COPY %[[V]]
1383 BX_RET 14, $noreg, implicit $s0
1384 ; CHECK: BX_RET 14, $noreg, implicit $s0
1388 # CHECK-LABEL: name: test_load_f64
1390 regBankSelected: true
1392 # CHECK: selected: true
1394 - { id: 0, class: gprb }
1395 - { id: 1, class: fprb }
1401 ; CHECK: %[[P:[0-9]+]]:gpr = COPY $r0
1403 %1(s64) = G_LOAD %0(p0) :: (load 8)
1404 ; CHECK: %[[V:[0-9]+]]:dpr = VLDRD %[[P]], 0, 14, $noreg
1407 ; CHECK: $d0 = COPY %[[V]]
1409 BX_RET 14, $noreg, implicit $d0
1410 ; CHECK: BX_RET 14, $noreg, implicit $d0
1414 # CHECK-LABEL: name: test_stores
1416 regBankSelected: true
1418 # CHECK: selected: true
1420 - { id: 0, class: gprb }
1421 - { id: 1, class: gprb }
1422 - { id: 2, class: gprb }
1423 - { id: 3, class: gprb }
1424 - { id: 4, class: fprb }
1425 - { id: 5, class: fprb }
1426 # CHECK: id: [[P:[0-9]+]], class: gpr
1427 # CHECK: id: [[I8:[0-9]+]], class: gpr
1428 # CHECK: id: [[I16:[0-9]+]], class: gpr
1429 # CHECK: id: [[I32:[0-9]+]], class: gpr
1430 # CHECK: id: [[F32:[0-9]+]], class: spr
1431 # CHECK: id: [[F64:[0-9]+]], class: dpr
1434 liveins: $r0, $r1, $s0, $d0
1440 %1(s8) = G_TRUNC %3(s32)
1441 %2(s16) = G_TRUNC %3(s32)
1443 G_STORE %1(s8), %0(p0) :: (store 1)
1444 ; CHECK: STRBi12 %[[I8]], %[[P]], 0, 14, $noreg
1446 G_STORE %2(s16), %0(p0) :: (store 2)
1447 ; CHECK: STRH %[[I32]], %[[P]], $noreg, 0, 14, $noreg
1449 G_STORE %3(s32), %0(p0) :: (store 4)
1450 ; CHECK: STRi12 %[[I32]], %[[P]], 0, 14, $noreg
1452 G_STORE %4(s32), %0(p0) :: (store 4)
1453 ; CHECK: VSTRS %[[F32]], %[[P]], 0, 14, $noreg
1455 G_STORE %5(s64), %0(p0) :: (store 8)
1456 ; CHECK: VSTRD %[[F64]], %[[P]], 0, 14, $noreg
1462 # CHECK-LABEL: name: test_gep
1464 regBankSelected: true
1466 # CHECK: selected: true
1468 - { id: 0, class: gprb }
1469 - { id: 1, class: gprb }
1470 - { id: 2, class: gprb }
1476 ; CHECK: %[[PTR:[0-9]+]]:gpr = COPY $r0
1479 ; CHECK: %[[OFF:[0-9]+]]:gpr = COPY $r1
1481 %2(p0) = G_GEP %0, %1(s32)
1482 ; CHECK: %[[GEP:[0-9]+]]:gpr = ADDrr %[[PTR]], %[[OFF]], 14, $noreg, $noreg
1485 BX_RET 14, $noreg, implicit $r0
1488 name: test_MOVi32imm
1489 # CHECK-LABEL: name: test_MOVi32imm
1491 regBankSelected: true
1493 # CHECK: selected: true
1495 - { id: 0, class: gprb }
1498 %0(s32) = G_CONSTANT i32 65537
1499 ; CHECK: %[[C:[0-9]+]]:gpr = MOVi32imm 65537
1502 BX_RET 14, $noreg, implicit $r0
1505 name: test_constant_imm
1506 # CHECK-LABEL: name: test_constant_imm
1508 regBankSelected: true
1510 # CHECK: selected: true
1512 - { id: 0, class: gprb }
1515 %0(s32) = G_CONSTANT i32 42
1516 ; CHECK: %[[C:[0-9]+]]:gpr = MOVi 42, 14, $noreg, $noreg
1519 BX_RET 14, $noreg, implicit $r0
1522 name: test_constant_cimm
1523 # CHECK-LABEL: name: test_constant_cimm
1525 regBankSelected: true
1527 # CHECK: selected: true
1529 - { id: 0, class: gprb }
1532 ; Adding a type on G_CONSTANT changes its operand from an Imm into a CImm.
1533 ; We still want to see the same thing in the output though.
1534 %0(s32) = G_CONSTANT i32 42
1535 ; CHECK: %[[C:[0-9]+]]:gpr = MOVi 42, 14, $noreg, $noreg
1538 BX_RET 14, $noreg, implicit $r0
1541 name: test_pointer_constant_unconstrained
1542 # CHECK-LABEL: name: test_pointer_constant_unconstrained
1544 regBankSelected: true
1546 # CHECK: selected: true
1548 - { id: 0, class: gprb }
1551 %0(p0) = G_CONSTANT i32 0
1552 ; CHECK: %[[C:[0-9]+]]:gpr = MOVi 0, 14, $noreg, $noreg
1554 ; This leaves %0 unconstrained before the G_CONSTANT is selected.
1556 BX_RET 14, $noreg, implicit $r0
1559 name: test_pointer_constant_constrained
1560 # CHECK-LABEL: name: test_pointer_constant_constrained
1562 regBankSelected: true
1564 # CHECK: selected: true
1566 - { id: 0, class: gprb }
1569 %0(p0) = G_CONSTANT i32 0
1570 ; CHECK: %[[C:[0-9]+]]:gpr = MOVi 0, 14, $noreg, $noreg
1572 ; This constrains %0 before the G_CONSTANT is selected.
1573 G_STORE %0(p0), %0(p0) :: (store 4)
1576 name: test_inttoptr_s32
1577 # CHECK-LABEL: name: test_inttoptr_s32
1579 regBankSelected: true
1581 # CHECK: selected: true
1583 - { id: 0, class: gprb }
1584 - { id: 1, class: gprb }
1590 %1(p0) = G_INTTOPTR %0(s32)
1591 ; CHECK: [[INT:%[0-9]+]]:gpr = COPY $r0
1594 ; CHECK: $r0 = COPY [[INT]]
1596 BX_RET 14, $noreg, implicit $r0
1599 name: test_ptrtoint_s32
1600 # CHECK-LABEL: name: test_ptrtoint_s32
1602 regBankSelected: true
1604 # CHECK: selected: true
1606 - { id: 0, class: gprb }
1607 - { id: 1, class: gprb }
1613 %1(s32) = G_PTRTOINT %0(p0)
1614 ; CHECK: [[PTR:%[0-9]+]]:gpr = COPY $r0
1617 ; CHECK: $r0 = COPY [[PTR]]
1619 BX_RET 14, $noreg, implicit $r0
1622 name: test_select_s32
1623 # CHECK-LABEL: name: test_select_s32
1625 regBankSelected: true
1627 # CHECK: selected: true
1629 - { id: 0, class: gprb }
1630 - { id: 1, class: gprb }
1631 - { id: 2, class: gprb }
1632 - { id: 3, class: gprb }
1638 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1641 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1643 %2(s1) = G_TRUNC %1(s32)
1645 %3(s32) = G_SELECT %2(s1), %0, %1
1646 ; CHECK: CMPri [[VREGY]], 0, 14, $noreg, implicit-def $cpsr
1647 ; CHECK: [[RES:%[0-9]+]]:gpr = MOVCCr [[VREGX]], [[VREGY]], 0, $cpsr
1650 ; CHECK: $r0 = COPY [[RES]]
1652 BX_RET 14, $noreg, implicit $r0
1653 ; CHECK: BX_RET 14, $noreg, implicit $r0
1656 name: test_select_ptr
1657 # CHECK-LABEL: name: test_select_ptr
1659 regBankSelected: true
1661 # CHECK: selected: true
1663 - { id: 0, class: gprb }
1664 - { id: 1, class: gprb }
1665 - { id: 2, class: gprb }
1666 - { id: 3, class: gprb }
1667 - { id: 4, class: gprb }
1670 liveins: $r0, $r1, $r2
1673 ; CHECK: [[VREGX:%[0-9]+]]:gpr = COPY $r0
1676 ; CHECK: [[VREGY:%[0-9]+]]:gpr = COPY $r1
1679 ; CHECK: [[VREGC:%[0-9]+]]:gpr = COPY $r2
1681 %3(s1) = G_TRUNC %2(s32)
1683 %4(p0) = G_SELECT %3(s1), %0, %1
1684 ; CHECK: CMPri [[VREGC]], 0, 14, $noreg, implicit-def $cpsr
1685 ; CHECK: [[RES:%[0-9]+]]:gpr = MOVCCr [[VREGX]], [[VREGY]], 0, $cpsr
1688 ; CHECK: $r0 = COPY [[RES]]
1690 BX_RET 14, $noreg, implicit $r0
1691 ; CHECK: BX_RET 14, $noreg, implicit $r0
1695 # CHECK-LABEL: name: test_br
1697 regBankSelected: true
1699 # CHECK: selected: true
1701 - { id: 0, class: gprb }
1702 - { id: 1, class: gprb }
1706 successors: %bb.1(0x40000000), %bb.2(0x40000000)
1710 ; CHECK: [[COND32:%[0-9]+]]:gpr = COPY $r0
1711 %1(s1) = G_TRUNC %0(s32)
1713 G_BRCOND %1(s1), %bb.1
1714 ; CHECK: TSTri [[COND32]], 1, 14, $noreg, implicit-def $cpsr
1715 ; CHECK: Bcc %bb.1, 1, $cpsr
1721 successors: %bb.2(0x80000000)
1730 ; CHECK: BX_RET 14, $noreg
1734 # CHECK-LABEL: name: test_phi_s32
1736 regBankSelected: true
1738 # CHECK: selected: true
1739 tracksRegLiveness: true
1741 - { id: 0, class: gprb }
1742 - { id: 1, class: gprb }
1743 - { id: 2, class: gprb }
1744 - { id: 3, class: gprb }
1745 - { id: 4, class: gprb }
1748 ; CHECK: [[BB1:bb.0]]:
1749 successors: %bb.1(0x40000000), %bb.2(0x40000000)
1750 liveins: $r0, $r1, $r2
1753 %1(s1) = G_TRUNC %0(s32)
1757 ; CHECK: [[V1:%[0-9]+]]:gpr = COPY $r1
1758 ; CHECK: [[V2:%[0-9]+]]:gpr = COPY $r2
1760 G_BRCOND %1(s1), %bb.1
1764 ; CHECK: [[BB2:bb.1]]:
1765 successors: %bb.2(0x80000000)
1772 %4(s32) = G_PHI %2(s32), %bb.0, %3(s32), %bb.1
1773 ; CHECK: {{%[0-9]+}}:gpr = PHI [[V1]], %[[BB1]], [[V2]], %[[BB2]]
1776 BX_RET 14, $noreg, implicit $r0
1780 # CHECK-LABEL: name: test_phi_s64
1782 regBankSelected: true
1784 # CHECK: selected: true
1785 tracksRegLiveness: true
1787 - { id: 0, class: gprb }
1788 - { id: 1, class: gprb }
1789 - { id: 2, class: fprb }
1790 - { id: 3, class: fprb }
1791 - { id: 4, class: fprb }
1794 ; CHECK: [[BB1:bb.0]]:
1795 successors: %bb.1(0x40000000), %bb.2(0x40000000)
1796 liveins: $r0, $d0, $d1
1799 %1(s1) = G_TRUNC %0(s32)
1803 ; CHECK: [[V1:%[0-9]+]]:dpr = COPY $d0
1804 ; CHECK: [[V2:%[0-9]+]]:dpr = COPY $d1
1806 G_BRCOND %1(s1), %bb.1
1810 ; CHECK: [[BB2:bb.1]]:
1811 successors: %bb.2(0x80000000)
1818 %4(s64) = G_PHI %2(s64), %bb.0, %3(s64), %bb.1
1819 ; CHECK: {{%[0-9]+}}:dpr = PHI [[V1]], %[[BB1]], [[V2]], %[[BB2]]
1822 BX_RET 14, $noreg, implicit $d0
1825 name: test_soft_fp_double
1826 # CHECK-LABEL: name: test_soft_fp_double
1828 regBankSelected: true
1830 # CHECK: selected: true
1832 - { id: 0, class: gprb }
1833 - { id: 1, class: gprb }
1834 - { id: 2, class: fprb }
1835 - { id: 3, class: gprb }
1836 - { id: 4, class: gprb }
1839 liveins: $r0, $r1, $r2, $r3
1842 ; CHECK: [[IN1:%[0-9]+]]:gpr = COPY $r2
1845 ; CHECK: [[IN2:%[0-9]+]]:gpr = COPY $r3
1847 %2(s64) = G_MERGE_VALUES %0(s32), %1(s32)
1848 ; CHECK: %[[DREG:[0-9]+]]:dpr = VMOVDRR [[IN1]], [[IN2]]
1850 %3(s32), %4(s32) = G_UNMERGE_VALUES %2(s64)
1851 ; CHECK: [[OUT1:%[0-9]+]]:gpr, [[OUT2:%[0-9]+]]:gpr = VMOVRRD %[[DREG]]
1854 ; CHECK: $r0 = COPY [[OUT1]]
1857 ; CHECK: $r1 = COPY [[OUT2]]
1859 BX_RET 14, $noreg, implicit $r0, implicit $r1
1860 ; CHECK: BX_RET 14, $noreg, implicit $r0, implicit $r1