1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 # RUN: llc -o - %s -mtriple=loongarch64 -mattr=+d \
3 # RUN: -run-pass=register-coalescer -join-liveintervals=1 -join-splitedges=0 | FileCheck %s
7 tracksRegLiveness: true
9 ; CHECK-LABEL: name: foo
11 ; CHECK-NEXT: successors: %bb.1(0x80000000)
12 ; CHECK-NEXT: liveins: $r4, $r5, $r6, $r7, $r8
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $r8
15 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $r7
16 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $r6
17 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr = COPY $r5
18 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr = COPY $r4
19 ; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[COPY3]], 1
20 ; CHECK-NEXT: [[ORI:%[0-9]+]]:gpr = ORI $r0, 1
21 ; CHECK-NEXT: [[ANDI1:%[0-9]+]]:gpr = ANDI [[COPY2]], 1
22 ; CHECK-NEXT: [[ANDI2:%[0-9]+]]:gpr = ANDI [[COPY1]], 1
23 ; CHECK-NEXT: [[ANDI3:%[0-9]+]]:gpr = ANDI [[COPY]], 1
24 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr = COPY $r0
25 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr = COPY $r0
28 ; CHECK-NEXT: successors: %bb.2(0x80000000)
30 ; CHECK-NEXT: [[COPY7:%[0-9]+]]:gpr = COPY [[COPY5]]
33 ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.4(0x40000000)
35 ; CHECK-NEXT: BEQZ [[ANDI]], %bb.4
38 ; CHECK-NEXT: successors: %bb.9(0x80000000)
40 ; CHECK-NEXT: PseudoBR %bb.9
43 ; CHECK-NEXT: successors: %bb.5(0x80000000)
46 ; CHECK-NEXT: successors: %bb.7(0x7c000000), %bb.6(0x04000000)
48 ; CHECK-NEXT: dead [[LD_D:%[0-9]+]]:gpr = LD_D $r0, 8
49 ; CHECK-NEXT: dead [[LD_D1:%[0-9]+]]:gpr = LD_D $r0, 0
50 ; CHECK-NEXT: BNEZ [[ANDI1]], %bb.7
53 ; CHECK-NEXT: successors: %bb.11(0x80000000)
55 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr = COPY $r0
56 ; CHECK-NEXT: PseudoBR %bb.11
59 ; CHECK-NEXT: successors: %bb.8(0x7c000000), %bb.10(0x04000000)
61 ; CHECK-NEXT: BEQZ [[ANDI2]], %bb.10
62 ; CHECK-NEXT: PseudoBR %bb.8
65 ; CHECK-NEXT: successors: %bb.9(0x04000000), %bb.5(0x7c000000)
67 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr = ADDI_D [[COPY6]], 1
68 ; CHECK-NEXT: BEQZ [[ANDI3]], %bb.5
69 ; CHECK-NEXT: PseudoBR %bb.9
72 ; CHECK-NEXT: successors: %bb.12(0x80000000)
74 ; CHECK-NEXT: ST_B $r0, [[COPY4]], 0
75 ; CHECK-NEXT: PseudoBR %bb.12
78 ; CHECK-NEXT: successors: %bb.11(0x80000000)
80 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr = ADDI_D [[COPY6]], 1
81 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr = ORI $r0, 1
84 ; CHECK-NEXT: successors: %bb.12(0x80000000)
86 ; CHECK-NEXT: ST_D $r0, [[COPY4]], 0
89 ; CHECK-NEXT: successors: %bb.2(0x7c000000), %bb.1(0x04000000)
91 ; CHECK-NEXT: BEQ [[COPY7]], [[ORI]], %bb.2
92 ; CHECK-NEXT: PseudoBR %bb.1
94 liveins: $r4, $r5, $r6, $r7, $r8
96 %0:gpr = COPY killed $r8
97 %1:gpr = COPY killed $r7
98 %2:gpr = COPY killed $r6
99 %3:gpr = COPY killed $r5
100 %4:gpr = COPY killed $r4
102 %6:gpr = COPY killed %5
103 %7:gpr = ANDI killed %3, 1
105 %9:gpr = ANDI killed %2, 1
106 %10:gpr = ANDI killed %1, 1
107 %11:gpr = ANDI killed %0, 1
109 %13:gpr = COPY killed %6
110 %14:gpr = IMPLICIT_DEF
113 %15:gpr = COPY killed %14
114 %16:gpr = COPY killed %13
115 %17:gpr = COPY killed %12
118 %20:gpr = COPY killed %16
119 %21:gpr = COPY killed %15
122 successors: %bb.3, %bb.4
124 %22:gpr = COPY killed %21
125 %23:gpr = COPY killed %20
126 %24:gpr = COPY killed %19
127 %25:gpr = COPY killed %18
131 %26:gpr = COPY killed %24
132 %27:gpr = COPY killed %23
136 %28:gpr = COPY killed %23
139 successors: %bb.7(0x7c000000), %bb.6(0x04000000)
141 %29:gpr = COPY killed %28
142 dead %30:gpr = LD_D $r0, 8
143 dead %31:gpr = LD_D $r0, 0
148 %33:gpr = COPY killed %32
149 %34:gpr = COPY killed %33
150 %35:gpr = COPY killed %22
154 successors: %bb.8(0x7c000000), %bb.10(0x04000000)
160 successors: %bb.9(0x04000000), %bb.5(0x7c000000)
162 %36:gpr = ADDI_D killed %29, 1
165 %27:gpr = COPY killed %36
170 %37:gpr = COPY killed %27
171 %38:gpr = COPY killed %26
173 ST_B killed %39, %4, 0
174 %40:gpr = COPY killed %25
175 %41:gpr = COPY killed %38
176 %42:gpr = COPY killed %37
177 %43:gpr = COPY killed %22
181 %44:gpr = ADDI_D killed %29, 1
183 %35:gpr = COPY killed %44
186 %45:gpr = COPY killed %35
187 %46:gpr = COPY killed %34
189 ST_D killed %47, %4, 0
192 %42:gpr = COPY killed %46
193 %43:gpr = COPY killed %45
196 successors: %bb.2(0x7c000000), %bb.1(0x04000000)
198 %48:gpr = COPY killed %43
199 %49:gpr = COPY killed %42
200 %50:gpr = COPY killed %41
201 %51:gpr = COPY killed %40
205 %18:gpr = COPY killed %51
206 %19:gpr = COPY killed %50
207 %20:gpr = COPY killed %49
208 %21:gpr = COPY killed %48