266 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O3 -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \3# RUN: -simplify-mir -run-pass=machine-cp %s -o - | FileCheck %s4 5--- |6 declare void @foo()7 define void @test0() {8 entry:9 ret void10 }11 12 define void @test1() {13 entry:14 ret void15 }16 17 define void @test2() {18 entry:19 ret void20 }21 22 define void @test3() {23 entry:24 ret void25 }26 27 define void @test4() {28 entry:29 ret void30 }31 32 define void @test5() {33 entry:34 ret void35 }36 37 define void @test6() {38 entry:39 ret void40 }41 42...43---44name: test045alignment: 446tracksRegLiveness: true47body: |48 bb.0.entry:49 liveins: $x4, $x5, $x20, $x21, $x2250 ; CHECK-LABEL: name: test051 ; CHECK: liveins: $x4, $x5, $x20, $x21, $x2252 ; CHECK-NEXT: {{ $}}53 ; CHECK-NEXT: renamable $x24 = COPY $x454 ; CHECK-NEXT: $x23 = COPY renamable $x2055 ; CHECK-NEXT: renamable $x20 = ADD8 $x4, $x556 ; CHECK-NEXT: renamable $x4 = COPY renamable $x2057 ; CHECK-NEXT: renamable $x20 = COPY $x2358 ; CHECK-NEXT: renamable $x23 = COPY renamable $x2459 ; CHECK-NEXT: $x3 = COPY renamable $x460 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x20, implicit $x21, implicit $x22, implicit $x2361 renamable $x23 = COPY renamable $x462 renamable $x24 = COPY renamable $x2363 renamable $x23 = COPY renamable $x2264 renamable $x22 = COPY renamable $x2165 renamable $x21 = COPY renamable $x2066 renamable $x20 = ADD8 $x4, $x567 renamable $x4 = COPY renamable $x2068 renamable $x20 = COPY renamable $x2169 renamable $x21 = COPY renamable $x2270 renamable $x22 = COPY renamable $x2371 renamable $x23 = COPY renamable $x2472 $x3 = COPY renamable $x473 BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x20, implicit $x21, implicit $x22, implicit $x2374 75...76 77# Duplicated pairs.78---79name: test180alignment: 481tracksRegLiveness: true82body: |83 bb.0.entry:84 liveins: $x3, $x20, $x21, $x22, $x2385 ; CHECK-LABEL: name: test186 ; CHECK: liveins: $x3, $x20, $x21, $x22, $x2387 ; CHECK-NEXT: {{ $}}88 ; CHECK-NEXT: renamable $x24 = COPY $x389 ; CHECK-NEXT: renamable $x23 = COPY renamable $x2290 ; CHECK-NEXT: renamable $x22 = COPY renamable $x2191 ; CHECK-NEXT: renamable $x21 = COPY renamable $x2092 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x2493 renamable $x23 = COPY $x394 renamable $x24 = COPY renamable $x2395 renamable $x23 = COPY renamable $x2296 renamable $x22 = COPY renamable $x2197 renamable $x21 = COPY renamable $x2098 renamable $x20 = COPY renamable $x2199 renamable $x21 = COPY renamable $x22100 renamable $x22 = COPY renamable $x23101 renamable $x23 = COPY renamable $x24102 renamable $x24 = COPY renamable $x23103 renamable $x23 = COPY renamable $x22104 renamable $x22 = COPY renamable $x21105 renamable $x21 = COPY renamable $x20106 BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24107 108...109 110# Chain one after one.111---112name: test2113alignment: 4114tracksRegLiveness: true115body: |116 bb.0.entry:117 liveins: $x3, $x18, $x19, $x20, $x21, $x22, $x23, $x24118 ; CHECK-LABEL: name: test2119 ; CHECK: liveins: $x3, $x18, $x19, $x20, $x21, $x22, $x23, $x24120 ; CHECK-NEXT: {{ $}}121 ; CHECK-NEXT: renamable $x21 = COPY renamable $x20122 ; CHECK-NEXT: renamable $x20 = COPY renamable $x21123 ; CHECK-NEXT: renamable $x25 = COPY renamable $x24124 ; CHECK-NEXT: renamable $x24 = COPY renamable $x25125 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25126 renamable $x21 = COPY renamable $x20127 renamable $x20 = COPY renamable $x19128 renamable $x19 = COPY renamable $x18129 renamable $x18 = COPY renamable $x19130 renamable $x19 = COPY renamable $x20131 renamable $x20 = COPY renamable $x21132 renamable $x25 = COPY renamable $x24133 renamable $x24 = COPY renamable $x23134 renamable $x23 = COPY renamable $x22135 renamable $x22 = COPY renamable $x23136 renamable $x23 = COPY renamable $x24137 renamable $x24 = COPY renamable $x25138 BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25139 140...141 142# Reorder code in test2, thus we have two chains in build simultaneously.143---144name: test3145alignment: 4146tracksRegLiveness: true147body: |148 bb.0.entry:149 liveins: $x3, $x18, $x19, $x20, $x21, $x22, $x23, $x24150 ; CHECK-LABEL: name: test3151 ; CHECK: liveins: $x3, $x18, $x19, $x20, $x21, $x22, $x23, $x24152 ; CHECK-NEXT: {{ $}}153 ; CHECK-NEXT: renamable $x21 = COPY renamable $x20154 ; CHECK-NEXT: renamable $x25 = COPY renamable $x24155 ; CHECK-NEXT: renamable $x20 = COPY renamable $x21156 ; CHECK-NEXT: renamable $x24 = COPY renamable $x25157 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25158 renamable $x21 = COPY renamable $x20159 renamable $x25 = COPY renamable $x24160 renamable $x20 = COPY renamable $x19161 renamable $x24 = COPY renamable $x23162 renamable $x19 = COPY renamable $x18163 renamable $x23 = COPY renamable $x22164 renamable $x18 = COPY renamable $x19165 renamable $x22 = COPY renamable $x23166 renamable $x19 = COPY renamable $x20167 renamable $x23 = COPY renamable $x24168 renamable $x20 = COPY renamable $x21169 renamable $x24 = COPY renamable $x25170 BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25171 172...173 174---175name: test4176alignment: 4177tracksRegLiveness: true178body: |179 bb.0.entry:180 liveins: $x3, $x4, $x5181 ; CHECK-LABEL: name: test4182 ; CHECK: liveins: $x3, $x4, $x5183 ; CHECK-NEXT: {{ $}}184 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3185 renamable $x5 = COPY renamable $x3186 renamable $x4 = COPY renamable $x3187 renamable $x2 = COPY renamable $x3188 renamable $x3 = COPY renamable $x2189 renamable $x3 = COPY renamable $x4190 renamable $x3 = COPY renamable $x5191 BLR8 implicit $lr8, implicit undef $rm, implicit $x3192 193...194 195# Chain across regmask.196---197name: test5198alignment: 4199tracksRegLiveness: true200body: |201 bb.0.entry:202 liveins: $x17, $x16, $x15, $x14, $x3203 ; CHECK-LABEL: name: test5204 ; CHECK: liveins: $x17, $x16, $x15, $x14, $x3205 ; CHECK-NEXT: {{ $}}206 ; CHECK-NEXT: renamable $x18 = COPY renamable $x17207 ; CHECK-NEXT: $x17 = COPY renamable $x3208 ; CHECK-NEXT: BL8_NOP @foo, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit-def $x3, implicit $x3209 ; CHECK-NEXT: renamable $x3 = COPY $x17210 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3211 renamable $x18 = COPY renamable $x17212 renamable $x17 = COPY renamable $x16213 renamable $x16 = COPY renamable $x15214 renamable $x15 = COPY renamable $x14215 renamable $x14 = COPY renamable $x3216 BL8_NOP @foo, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit-def $x3, implicit $x3217 renamable $x3 = COPY renamable $x14218 renamable $x14 = COPY renamable $x15219 renamable $x15 = COPY renamable $x16220 renamable $x16 = COPY renamable $x17221 renamable $x17 = COPY renamable $x18222 BLR8 implicit $lr8, implicit undef $rm, implicit $x3223 224...225 226# Two chains across regmask.227---228name: test6229alignment: 4230tracksRegLiveness: true231body: |232 bb.0.entry:233 liveins: $x20, $x19, $x17, $x16, $x15, $x14, $x3, $x4234 ; CHECK-LABEL: name: test6235 ; CHECK: liveins: $x20, $x19, $x17, $x16, $x15, $x14, $x3, $x4236 ; CHECK-NEXT: {{ $}}237 ; CHECK-NEXT: renamable $x21 = COPY renamable $x20238 ; CHECK-NEXT: renamable $x18 = COPY renamable $x17239 ; CHECK-NEXT: $x17 = COPY renamable $x3240 ; CHECK-NEXT: $x20 = COPY renamable $x4241 ; CHECK-NEXT: BL8_NOP @foo, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit-def $x3, implicit $x3, implicit-def $x4, implicit $x4242 ; CHECK-NEXT: renamable $x3 = COPY $x17243 ; CHECK-NEXT: renamable $x4 = COPY $x20244 ; CHECK-NEXT: BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x4245 renamable $x21 = COPY renamable $x20246 renamable $x18 = COPY renamable $x17247 renamable $x17 = COPY renamable $x16248 renamable $x16 = COPY renamable $x15249 renamable $x20 = COPY renamable $x19250 renamable $x15 = COPY renamable $x14251 renamable $x14 = COPY renamable $x3252 renamable $x19 = COPY renamable $x4253 BL8_NOP @foo, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit-def $x3, implicit $x3, implicit-def $x4, implicit $x4254 renamable $x3 = COPY renamable $x14255 renamable $x14 = COPY renamable $x15256 renamable $x4 = COPY renamable $x19257 renamable $x15 = COPY renamable $x16258 renamable $x19 = COPY renamable $x20259 renamable $x16 = COPY renamable $x17260 renamable $x20 = COPY renamable $x21261 renamable $x17 = COPY renamable $x18262 BLR8 implicit $lr8, implicit undef $rm, implicit $x3, implicit $x4263 264...265 266