1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=armv7-apple-ios -run-pass=regallocfast -o - %s | FileCheck %s
5 # tBX_RET uses an implicit vreg with a sub-register. That implicit use will
6 # typically be rewritten as a use of the relevant super-register. Make sure
7 # regallocfast is able to process the remaining operands (here, %2) and rewrite
8 # them to use physical registers.
11 tracksRegLiveness: true
14 liveins: $d2, $d4, $d7
16 ; CHECK-LABEL: name: different_vreg
17 ; CHECK: liveins: $d2, $d4, $d7
19 ; CHECK-NEXT: renamable $d5 = COPY killed $d4
20 ; CHECK-NEXT: renamable $d4 = COPY killed $d2
21 ; CHECK-NEXT: undef renamable $d0 = COPY renamable $d5, implicit-def $q0_q1
22 ; CHECK-NEXT: renamable $d1 = COPY renamable $d4
23 ; CHECK-NEXT: renamable $d2 = COPY killed renamable $d5
24 ; CHECK-NEXT: renamable $d3 = COPY killed renamable $d4
25 ; CHECK-NEXT: tBX_RET 14 /* CC::al */, $noreg, implicit killed renamable $d7, implicit killed $q0_q1
26 %0:dpr_vfp2 = COPY $d4
27 %1:dpr_vfp2 = COPY $d2
28 %2:dpr_vfp2 = COPY $d7
29 undef %4.dsub_0:dquad = COPY %0
30 %4.dsub_1:dquad = COPY %1
31 %4.dsub_2:dquad = COPY %0
32 %4.dsub_3:dquad = COPY %1
33 tBX_RET 14, $noreg, implicit %4.dsub_3, implicit %2
37 # tBX_RET uses the same vreg twice, make sure regallocfast is able to allocate a
38 # physical register for it and replace both references.
41 tracksRegLiveness: true
46 ; CHECK-LABEL: name: same_vreg_twice
47 ; CHECK: liveins: $d2, $d4
49 ; CHECK-NEXT: renamable $d5 = COPY killed $d4
50 ; CHECK-NEXT: renamable $d4 = COPY killed $d2
51 ; CHECK-NEXT: undef renamable $d0 = COPY renamable $d5, implicit-def $q0_q1
52 ; CHECK-NEXT: renamable $d1 = COPY renamable $d4
53 ; CHECK-NEXT: renamable $d2 = COPY killed renamable $d5
54 ; CHECK-NEXT: renamable $d3 = COPY killed renamable $d4
55 ; CHECK-NEXT: tBX_RET 14 /* CC::al */, $noreg, implicit renamable $d3, implicit killed $q0_q1
56 %0:dpr_vfp2 = COPY $d4
57 %1:dpr_vfp2 = COPY $d2
58 undef %4.dsub_0:dquad = COPY %0
59 %4.dsub_1:dquad = COPY %1
60 %4.dsub_2:dquad = COPY %0
61 %4.dsub_3:dquad = COPY %1
62 tBX_RET 14, $noreg, implicit %4.dsub_1, implicit %4.dsub_3
65 # tBL partially defines two vregs, which turn out to be dead. Make sure
66 # regallocfast allocates a phys reg for both %0 and %1.
69 tracksRegLiveness: true
73 ; CHECK-LABEL: name: partial_dead
74 ; CHECK: tBL 14 /* CC::al */, $noreg, 0, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $q0_q1, implicit-def dead $q2_q3
75 ; CHECK-NEXT: tBX_RET 14 /* CC::al */, $noreg
76 tBL 14, $noreg, 0, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def undef %0.dsub_0:dquad, implicit-def undef %1.dsub_2:dquad