298 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O3 -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \3# RUN: -mcpu=pwr9 -simplify-mir -run-pass=machine-cp %s -o - | FileCheck %s4 5 6# Normal case7---8name: test09alignment: 410tracksRegLiveness: true11body: |12 bb.0.entry:13 ; CHECK-LABEL: name: test014 ; CHECK: $x3 = LI8 102415 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x316 renamable $x4 = LI8 102417 $x3 = COPY renamable killed $x418 BLR8 implicit $lr8, implicit undef $rm, implicit $x319 20...21 22# Not in terminal BBs23---24name: test125alignment: 426tracksRegLiveness: true27body: |28 ; CHECK-LABEL: name: test129 ; CHECK: bb.0.entry:30 ; CHECK: renamable $x4 = LI8 4231 ; CHECK: B %bb.132 ; CHECK: bb.1:33 ; CHECK: liveins: $x434 ; CHECK: $x3 = COPY killed renamable $x435 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x336 bb.0.entry:37 successors: %bb.138 39 renamable $x5 = LI8 4240 renamable $x4 = COPY renamable killed $x541 B %bb.142 43 bb.1:44 liveins: $x445 $x3 = COPY renamable killed $x446 BLR8 implicit $lr8, implicit undef $rm, implicit $x347 48...49 50# Use reserved register51---52name: test253alignment: 454tracksRegLiveness: true55body: |56 bb.0.entry:57 ; CHECK-LABEL: name: test258 ; CHECK: renamable $x4 = LI8 102459 ; CHECK: $x13 = COPY killed renamable $x460 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit undef $x361 renamable $x4 = LI8 102462 $x13 = COPY renamable killed $x463 BLR8 implicit $lr8, implicit undef $rm, implicit undef $x364 65...66 67# Intermediate read of copy's src68---69name: test370alignment: 471tracksRegLiveness: true72body: |73 bb.0.entry:74 ; CHECK-LABEL: name: test375 ; CHECK: renamable $x4 = LI8 076 ; CHECK: renamable $x5 = ADDI8 $x4, 177 ; CHECK: $x3 = COPY killed renamable $x478 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x379 renamable $x4 = LI8 080 renamable $x5 = ADDI8 $x4, 181 $x3 = COPY renamable killed $x482 BLR8 implicit $lr8, implicit undef $rm, implicit $x383 84...85 86# Intermediate read of copy's def87---88name: test489alignment: 490tracksRegLiveness: true91body: |92 bb.0.entry:93 liveins: $x394 95 ; CHECK-LABEL: name: test496 ; CHECK: liveins: $x397 ; CHECK: renamable $x4 = LI8 098 ; CHECK: renamable $x5 = ADDI8 $x3, 199 ; CHECK: $x3 = COPY killed renamable $x4100 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3101 renamable $x4 = LI8 0102 renamable $x5 = ADDI8 $x3, 1103 $x3 = COPY renamable killed $x4104 BLR8 implicit $lr8, implicit undef $rm, implicit $x3105 106...107 108# Intermiediate clobber of copy's def109---110name: test5111alignment: 4112tracksRegLiveness: true113body: |114 bb.0.entry:115 liveins: $x3, $x5116 117 ; CHECK-LABEL: name: test5118 ; CHECK: liveins: $x3, $x5119 ; CHECK: renamable $x4 = LI8 0120 ; CHECK: renamable $x3 = ADDI8 $x5, 1121 ; CHECK: $x3 = COPY killed renamable $x4122 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3123 renamable $x4 = LI8 0124 renamable $x3 = ADDI8 $x5, 1125 $x3 = COPY renamable killed $x4126 BLR8 implicit $lr8, implicit undef $rm, implicit $x3127 128...129 130---131name: iterative_deletion132alignment: 4133tracksRegLiveness: true134body: |135 bb.0.entry:136 liveins: $x5137 138 ; CHECK-LABEL: name: iterative_deletion139 ; CHECK: liveins: $x5140 ; CHECK: renamable $x4 = ADDI8 killed renamable $x5, 1141 ; CHECK: $x3 = COPY $x4142 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3143 renamable $x6 = ADDI8 renamable killed $x5, 1144 renamable $x4 = COPY renamable killed $x6145 renamable $x7 = COPY renamable killed $x4146 $x3 = COPY renamable killed $x7147 BLR8 implicit $lr8, implicit undef $rm, implicit $x3148 149...150 151---152name: Enter153alignment: 4154tracksRegLiveness: true155body: |156 bb.0.entry:157 liveins: $x4, $x7158 ; CHECK-LABEL: name: Enter159 ; CHECK: liveins: $x4, $x7160 ; CHECK: renamable $x5 = COPY killed renamable $x7161 ; CHECK: renamable $x7 = ADDI8 killed renamable $x4, 1162 ; CHECK: $x3 = ADD8 killed renamable $x5, killed renamable $x7163 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3164 renamable $x5 = COPY killed renamable $x7165 renamable $x6 = ADDI8 killed renamable $x4, 1166 renamable $x7 = COPY killed renamable $x6167 $x3 = ADD8 renamable killed $x5, renamable killed $x7168 BLR8 implicit $lr8, implicit undef $rm, implicit $x3169 170...171 172---173name: foo174alignment: 4175tracksRegLiveness: true176body: |177 bb.0.entry:178 liveins: $x4, $x7179 ; CHECK-LABEL: name: foo180 ; CHECK: liveins: $x4, $x7181 ; CHECK: renamable $x5 = COPY killed renamable $x7182 ; CHECK: renamable $x7 = ADDI8 renamable $x4, 1183 ; CHECK: renamable $x6 = ADDI8 killed $x4, 2184 ; CHECK: $x3 = ADD8 killed renamable $x5, killed renamable $x6185 ; CHECK: $x3 = ADD8 $x3, killed renamable $x7186 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3187 renamable $x5 = COPY killed renamable $x7188 renamable $x6 = ADDI8 renamable $x4, 1189 renamable $x7 = COPY killed renamable $x6190 renamable $x8 = ADDI8 killed $x4, 2191 renamable $x6 = COPY killed renamable $x8192 $x3 = ADD8 renamable killed $x5, renamable killed $x6193 $x3 = ADD8 $x3, renamable killed $x7194 BLR8 implicit $lr8, implicit undef $rm, implicit $x3195 196...197 198---199name: bar200alignment: 4201tracksRegLiveness: true202body: |203 bb.0.entry:204 liveins: $x4, $x7205 ; CHECK-LABEL: name: bar206 ; CHECK: liveins: $x4, $x7207 ; CHECK: renamable $x5 = COPY killed renamable $x7208 ; CHECK: renamable $x7 = ADDI8 renamable $x4, 1209 ; CHECK: renamable $x8 = COPY killed renamable $x7210 ; CHECK: renamable $x7 = ADDI8 renamable $x5, 2211 ; CHECK: $x3 = ADD8 killed renamable $x5, killed renamable $x7212 ; CHECK: $x3 = ADD8 $x3, killed renamable $x8213 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3214 renamable $x5 = COPY killed renamable $x7215 renamable $x6 = ADDI8 renamable $x4, 1216 renamable $x7 = COPY killed renamable $x6217 renamable $x8 = COPY killed renamable $x7218 renamable $x6 = ADDI8 renamable $x5, 2219 renamable $x7 = COPY killed renamable $x6220 $x3 = ADD8 renamable killed $x5, renamable killed $x7221 $x3 = ADD8 $x3, renamable killed $x8222 BLR8 implicit $lr8, implicit undef $rm, implicit $x3223 224...225 226---227name: bogus228alignment: 4229tracksRegLiveness: true230body: |231 bb.0.entry:232 liveins: $x7233 ; CHECK-LABEL: name: bogus234 ; CHECK: liveins: $x7235 ; CHECK: renamable $x5 = COPY renamable $x7236 ; CHECK: renamable $x4 = ADDI8 $x7, 1237 ; CHECK: renamable $x6 = ADDI8 renamable $x5, 2238 ; CHECK: $x3 = ADD8 killed renamable $x4, killed renamable $x5239 ; CHECK: $x3 = ADD8 $x3, killed renamable $x6240 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3241 renamable $x5 = COPY killed renamable $x7242 renamable $x6 = ADDI8 renamable $x5, 1243 renamable $x4 = COPY killed renamable $x6244 renamable $x7 = COPY killed renamable $x4245 renamable $x6 = ADDI8 renamable $x5, 2246 renamable $x4 = COPY killed renamable $x7247 $x3 = ADD8 renamable killed $x4, renamable killed $x5248 $x3 = ADD8 $x3, renamable killed $x6249 BLR8 implicit $lr8, implicit undef $rm, implicit $x3250 251...252 253---254name: foobar255alignment: 4256tracksRegLiveness: true257body: |258 bb.0.entry:259 liveins: $x7260 ; CHECK-LABEL: name: foobar261 ; CHECK: liveins: $x7262 ; CHECK: renamable $x4 = ADDI8 $x7, 1263 ; CHECK: renamable $x8 = COPY killed renamable $x4264 ; CHECK: renamable $x4 = ADDI8 $x7, 2265 ; CHECK: $x3 = ADD8 killed renamable $x4, $x7266 ; CHECK: $x3 = ADD8 $x3, killed renamable $x8267 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3268 renamable $x5 = COPY killed renamable $x7269 renamable $x6 = ADDI8 renamable $x5, 1270 renamable $x4 = COPY killed renamable $x6271 renamable $x8 = COPY killed renamable $x4272 renamable $x6 = ADDI8 renamable $x5, 2273 renamable $x4 = COPY killed renamable $x6274 $x3 = ADD8 renamable killed $x4, renamable killed $x5275 $x3 = ADD8 $x3, renamable killed $x8276 BLR8 implicit $lr8, implicit undef $rm, implicit $x3277 278...279 280---281name: cross_call282alignment: 4283tracksRegLiveness: true284body: |285 bb.0.entry:286 liveins: $x2, $x3, $x20287 ; CHECK-LABEL: name: cross_call288 ; CHECK: liveins: $x2, $x3, $x20289 ; CHECK: renamable $x20 = LI8 1024290 ; CHECK: BL8_NOP @foo, csr_ppc64_altivec, implicit-def $lr8, implicit $rm, implicit $x3, implicit-def $x3, implicit $x2291 ; CHECK: $x3 = COPY killed renamable $x20292 ; CHECK: BLR8 implicit $lr8, implicit undef $rm, implicit $x3293 renamable $x20 = LI8 1024294 BL8_NOP @foo, csr_ppc64_altivec, implicit-def $lr8, implicit $rm, implicit $x3, implicit-def $x3, implicit $x2295 $x3 = COPY renamable killed $x20296 BLR8 implicit $lr8, implicit undef $rm, implicit $x3297...298