1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=thumbv7 -run-pass=if-converter %s -o - | FileCheck %s --check-prefix=CHECK-V7 3# RUN: llc -mtriple=thumbv8 -run-pass=if-converter %s -o - | FileCheck %s --check-prefix=CHECK-V8 4--- | 5 define void @test_nosize() { 6 %c0 = icmp sgt i64 0, 0 7 br i1 %c0, label %b1, label %b6 8 9 b1: ; preds = %0 10 br i1 undef, label %b3, label %b2 11 12 b2: ; preds = %b1 13 %v0 = tail call i32 @extfunc() 14 br label %b5 15 16 b3: ; preds = %b1 17 %v1 = load i32, i32* undef, align 4 18 %v2 = and i32 %v1, 256 19 br label %b5 20 21 b5: ; preds = %b3, %b2 22 %v3 = phi i32 [ %v2, %b3 ], [ %v0, %b2 ] 23 %c1 = icmp eq i32 %v3, 0 24 br i1 %c1, label %b8, label %b7 25 26 b6: ; preds = %0 27 %1 = tail call i32 @extfunc() 28 ret void 29 30 b7: ; preds = %b5 31 %2 = tail call i32 @extfunc() 32 ret void 33 34 b8: ; preds = %b5 35 ret void 36 } 37 38 ; Function Attrs: optsize 39 define void @test_optsize() #0 { 40 %c0 = icmp sgt i64 0, 0 41 br i1 %c0, label %b1, label %b6 42 43 b1: ; preds = %0 44 br i1 undef, label %b3, label %b2 45 46 b2: ; preds = %b1 47 %v0 = tail call i32 @extfunc() 48 br label %b5 49 50 b3: ; preds = %b1 51 %v1 = load i32, i32* undef, align 4 52 %v2 = and i32 %v1, 256 53 br label %b5 54 55 b5: ; preds = %b3, %b2 56 %v3 = phi i32 [ %v2, %b3 ], [ %v0, %b2 ] 57 %c1 = icmp eq i32 %v3, 0 58 br i1 %c1, label %b8, label %b7 59 60 b6: ; preds = %0 61 %1 = tail call i32 @extfunc() 62 ret void 63 64 b7: ; preds = %b5 65 %2 = tail call i32 @extfunc() 66 ret void 67 68 b8: ; preds = %b5 69 ret void 70 } 71 72 ; Function Attrs: minsize 73 define void @test_minsize() #1 { 74 %c0 = icmp sgt i64 0, 0 75 br i1 %c0, label %b1, label %b6 76 77 b1: ; preds = %0 78 br i1 undef, label %b3, label %b2 79 80 b2: ; preds = %b1 81 %v0 = tail call i32 @extfunc() 82 br label %b5 83 84 b3: ; preds = %b1 85 %v1 = load i32, i32* undef, align 4 86 %v2 = and i32 %v1, 256 87 br label %b5 88 89 b5: ; preds = %b3, %b2 90 %v3 = phi i32 [ %v2, %b3 ], [ %v0, %b2 ] 91 %c1 = icmp eq i32 %v3, 0 92 br i1 %c1, label %b8, label %b7 93 94 b6: ; preds = %0 95 %1 = tail call i32 @extfunc() 96 ret void 97 98 b7: ; preds = %b5 99 %2 = tail call i32 @extfunc() 100 ret void 101 102 b8: ; preds = %b5 103 ret void 104 } 105 106 declare i32 @extfunc() 107 108 ; Function Attrs: nounwind 109 declare void @llvm.stackprotector(i8*, i8**) #2 110 111 attributes #0 = { optsize } 112 attributes #1 = { minsize } 113 attributes #2 = { nounwind } 114 115... 116--- 117name: test_nosize 118alignment: 2 119exposesReturnsTwice: false 120legalized: false 121regBankSelected: false 122selected: false 123failedISel: false 124tracksRegLiveness: true 125hasWinCFI: false 126registers: [] 127liveins: [] 128frameInfo: 129 isFrameAddressTaken: false 130 isReturnAddressTaken: false 131 hasStackMap: false 132 hasPatchPoint: false 133 stackSize: 8 134 offsetAdjustment: 0 135 maxAlignment: 4 136 adjustsStack: true 137 hasCalls: true 138 stackProtector: '' 139 maxCallFrameSize: 0 140 cvBytesOfCalleeSavedRegisters: 0 141 hasOpaqueSPAdjustment: false 142 hasVAStart: false 143 hasMustTailInVarArgFunc: false 144 localFrameSize: 0 145 savePoint: '' 146 restorePoint: '' 147fixedStack: [] 148stack: 149 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4, 150 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true, 151 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 152 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4, 153 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true, 154 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 155callSites: [] 156constants: [] 157machineFunctionInfo: {} 158body: | 159 ; CHECK-V7-LABEL: name: test_nosize 160 ; CHECK-V7: bb.0 (%ir-block.0): 161 ; CHECK-V7: successors: %bb.1(0x80000000) 162 ; CHECK-V7: liveins: $lr, $r7 163 ; CHECK-V7: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 164 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 165 ; CHECK-V7: tTAILJMPdND @extfunc, 1 /* CC::ne */, killed $cpsr, implicit $sp, implicit $sp 166 ; CHECK-V7: bb.1.b1: 167 ; CHECK-V7: successors: %bb.3(0x40000000), %bb.2(0x40000000) 168 ; CHECK-V7: liveins: $r7, $lr 169 ; CHECK-V7: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 170 ; CHECK-V7: frame-setup CFI_INSTRUCTION def_cfa_offset 8 171 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $lr, -4 172 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $r7, -8 173 ; CHECK-V7: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 174 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 175 ; CHECK-V7: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 176 ; CHECK-V7: bb.2.b2: 177 ; CHECK-V7: successors: %bb.4(0x80000000) 178 ; CHECK-V7: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 179 ; CHECK-V7: t2B %bb.4, 14 /* CC::al */, $noreg 180 ; CHECK-V7: bb.3.b3: 181 ; CHECK-V7: successors: %bb.4(0x80000000) 182 ; CHECK-V7: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 183 ; CHECK-V7: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 184 ; CHECK-V7: bb.4.b5: 185 ; CHECK-V7: successors: %bb.5(0x50000000) 186 ; CHECK-V7: liveins: $r0 187 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 188 ; CHECK-V7: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 189 ; CHECK-V7: tBX_RET 0 /* CC::eq */, killed $cpsr 190 ; CHECK-V7: bb.5.b7: 191 ; CHECK-V7: liveins: $lr, $r7 192 ; CHECK-V7: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 193 ; CHECK-V8-LABEL: name: test_nosize 194 ; CHECK-V8: bb.0 (%ir-block.0): 195 ; CHECK-V8: successors: %bb.1(0x50000000), %bb.6(0x30000000) 196 ; CHECK-V8: liveins: $lr, $r7 197 ; CHECK-V8: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 198 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 199 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 200 ; CHECK-V8: bb.1.b1: 201 ; CHECK-V8: successors: %bb.3(0x40000000), %bb.2(0x40000000) 202 ; CHECK-V8: liveins: $r7, $lr 203 ; CHECK-V8: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 204 ; CHECK-V8: frame-setup CFI_INSTRUCTION def_cfa_offset 8 205 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $lr, -4 206 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $r7, -8 207 ; CHECK-V8: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 208 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 209 ; CHECK-V8: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 210 ; CHECK-V8: bb.2.b2: 211 ; CHECK-V8: successors: %bb.4(0x80000000) 212 ; CHECK-V8: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 213 ; CHECK-V8: t2B %bb.4, 14 /* CC::al */, $noreg 214 ; CHECK-V8: bb.3.b3: 215 ; CHECK-V8: successors: %bb.4(0x80000000) 216 ; CHECK-V8: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 217 ; CHECK-V8: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 218 ; CHECK-V8: bb.4.b5: 219 ; CHECK-V8: successors: %bb.5(0x30000000), %bb.6(0x50000000) 220 ; CHECK-V8: liveins: $r0 221 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 222 ; CHECK-V8: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 223 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 224 ; CHECK-V8: bb.5.b8: 225 ; CHECK-V8: liveins: $lr, $r7 226 ; CHECK-V8: tBX_RET 14 /* CC::al */, $noreg 227 ; CHECK-V8: bb.6.b7: 228 ; CHECK-V8: liveins: $lr, $r7 229 ; CHECK-V8: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 230 bb.0 (%ir-block.0): 231 successors: %bb.1(0x50000000), %bb.6(0x30000000) 232 liveins: $lr, $r7 233 234 renamable $r0 = t2MOVi 1, 14, $noreg, $noreg 235 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 236 t2Bcc %bb.6, 1, killed $cpsr 237 238 bb.1.b1: 239 successors: %bb.3(0x40000000), %bb.2(0x40000000) 240 liveins: $r7, $lr 241 242 $sp = frame-setup t2STMDB_UPD $sp, 14, $noreg, killed $r7, killed $lr 243 frame-setup CFI_INSTRUCTION def_cfa_offset 8 244 frame-setup CFI_INSTRUCTION offset $lr, -4 245 frame-setup CFI_INSTRUCTION offset $r7, -8 246 renamable $r0 = t2MOVi 0, 14, $noreg, $noreg 247 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 248 t2Bcc %bb.3, 1, killed $cpsr 249 250 bb.2.b2: 251 successors: %bb.4(0x80000000) 252 253 tBL 14, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 254 t2B %bb.4, 14, $noreg 255 256 bb.3.b3: 257 successors: %bb.4(0x80000000) 258 259 renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14, $noreg :: (load 4 from `i32* undef`) 260 renamable $r0 = t2ANDri killed renamable $r0, 256, 14, $noreg, $noreg 261 262 bb.4.b5: 263 successors: %bb.5(0x30000000), %bb.6(0x50000000) 264 liveins: $r0 265 266 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 267 $sp = t2LDMIA_UPD $sp, 14, $noreg, def $r7, def $lr 268 t2Bcc %bb.6, 1, killed $cpsr 269 270 bb.5.b8: 271 liveins: $lr, $r7 272 273 tBX_RET 14, $noreg 274 275 bb.6.b7: 276 liveins: $lr, $r7 277 278 tTAILJMPdND @extfunc, 14, $noreg, implicit $sp, implicit $sp 279 280... 281--- 282name: test_optsize 283alignment: 2 284exposesReturnsTwice: false 285legalized: false 286regBankSelected: false 287selected: false 288failedISel: false 289tracksRegLiveness: true 290hasWinCFI: false 291registers: [] 292liveins: [] 293frameInfo: 294 isFrameAddressTaken: false 295 isReturnAddressTaken: false 296 hasStackMap: false 297 hasPatchPoint: false 298 stackSize: 8 299 offsetAdjustment: 0 300 maxAlignment: 4 301 adjustsStack: true 302 hasCalls: true 303 stackProtector: '' 304 maxCallFrameSize: 0 305 cvBytesOfCalleeSavedRegisters: 0 306 hasOpaqueSPAdjustment: false 307 hasVAStart: false 308 hasMustTailInVarArgFunc: false 309 localFrameSize: 0 310 savePoint: '' 311 restorePoint: '' 312fixedStack: [] 313stack: 314 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4, 315 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true, 316 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 317 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4, 318 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true, 319 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 320callSites: [] 321constants: [] 322machineFunctionInfo: {} 323body: | 324 ; CHECK-V7-LABEL: name: test_optsize 325 ; CHECK-V7: bb.0 (%ir-block.0): 326 ; CHECK-V7: successors: %bb.1(0x50000000), %bb.6(0x30000000) 327 ; CHECK-V7: liveins: $lr, $r7 328 ; CHECK-V7: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 329 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 330 ; CHECK-V7: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 331 ; CHECK-V7: bb.1.b1: 332 ; CHECK-V7: successors: %bb.3(0x40000000), %bb.2(0x40000000) 333 ; CHECK-V7: liveins: $r7, $lr 334 ; CHECK-V7: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 335 ; CHECK-V7: frame-setup CFI_INSTRUCTION def_cfa_offset 8 336 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $lr, -4 337 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $r7, -8 338 ; CHECK-V7: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 339 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 340 ; CHECK-V7: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 341 ; CHECK-V7: bb.2.b2: 342 ; CHECK-V7: successors: %bb.4(0x80000000) 343 ; CHECK-V7: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 344 ; CHECK-V7: t2B %bb.4, 14 /* CC::al */, $noreg 345 ; CHECK-V7: bb.3.b3: 346 ; CHECK-V7: successors: %bb.4(0x80000000) 347 ; CHECK-V7: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 348 ; CHECK-V7: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 349 ; CHECK-V7: bb.4.b5: 350 ; CHECK-V7: successors: %bb.5(0x30000000), %bb.6(0x50000000) 351 ; CHECK-V7: liveins: $r0 352 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 353 ; CHECK-V7: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 354 ; CHECK-V7: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 355 ; CHECK-V7: bb.5.b8: 356 ; CHECK-V7: liveins: $lr, $r7 357 ; CHECK-V7: tBX_RET 14 /* CC::al */, $noreg 358 ; CHECK-V7: bb.6.b7: 359 ; CHECK-V7: liveins: $lr, $r7 360 ; CHECK-V7: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 361 ; CHECK-V8-LABEL: name: test_optsize 362 ; CHECK-V8: bb.0 (%ir-block.0): 363 ; CHECK-V8: successors: %bb.1(0x50000000), %bb.6(0x30000000) 364 ; CHECK-V8: liveins: $lr, $r7 365 ; CHECK-V8: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 366 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 367 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 368 ; CHECK-V8: bb.1.b1: 369 ; CHECK-V8: successors: %bb.3(0x40000000), %bb.2(0x40000000) 370 ; CHECK-V8: liveins: $r7, $lr 371 ; CHECK-V8: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 372 ; CHECK-V8: frame-setup CFI_INSTRUCTION def_cfa_offset 8 373 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $lr, -4 374 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $r7, -8 375 ; CHECK-V8: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 376 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 377 ; CHECK-V8: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 378 ; CHECK-V8: bb.2.b2: 379 ; CHECK-V8: successors: %bb.4(0x80000000) 380 ; CHECK-V8: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 381 ; CHECK-V8: t2B %bb.4, 14 /* CC::al */, $noreg 382 ; CHECK-V8: bb.3.b3: 383 ; CHECK-V8: successors: %bb.4(0x80000000) 384 ; CHECK-V8: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 385 ; CHECK-V8: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 386 ; CHECK-V8: bb.4.b5: 387 ; CHECK-V8: successors: %bb.5(0x30000000), %bb.6(0x50000000) 388 ; CHECK-V8: liveins: $r0 389 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 390 ; CHECK-V8: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 391 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 392 ; CHECK-V8: bb.5.b8: 393 ; CHECK-V8: liveins: $lr, $r7 394 ; CHECK-V8: tBX_RET 14 /* CC::al */, $noreg 395 ; CHECK-V8: bb.6.b7: 396 ; CHECK-V8: liveins: $lr, $r7 397 ; CHECK-V8: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 398 bb.0 (%ir-block.0): 399 successors: %bb.1(0x50000000), %bb.6(0x30000000) 400 liveins: $lr, $r7 401 402 renamable $r0 = t2MOVi 1, 14, $noreg, $noreg 403 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 404 t2Bcc %bb.6, 1, killed $cpsr 405 406 bb.1.b1: 407 successors: %bb.3(0x40000000), %bb.2(0x40000000) 408 liveins: $r7, $lr 409 410 $sp = frame-setup t2STMDB_UPD $sp, 14, $noreg, killed $r7, killed $lr 411 frame-setup CFI_INSTRUCTION def_cfa_offset 8 412 frame-setup CFI_INSTRUCTION offset $lr, -4 413 frame-setup CFI_INSTRUCTION offset $r7, -8 414 renamable $r0 = t2MOVi 0, 14, $noreg, $noreg 415 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 416 t2Bcc %bb.3, 1, killed $cpsr 417 418 bb.2.b2: 419 successors: %bb.4(0x80000000) 420 421 tBL 14, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 422 t2B %bb.4, 14, $noreg 423 424 bb.3.b3: 425 successors: %bb.4(0x80000000) 426 427 renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14, $noreg :: (load 4 from `i32* undef`) 428 renamable $r0 = t2ANDri killed renamable $r0, 256, 14, $noreg, $noreg 429 430 bb.4.b5: 431 successors: %bb.5(0x30000000), %bb.6(0x50000000) 432 liveins: $r0 433 434 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 435 $sp = t2LDMIA_UPD $sp, 14, $noreg, def $r7, def $lr 436 t2Bcc %bb.6, 1, killed $cpsr 437 438 bb.5.b8: 439 liveins: $lr, $r7 440 441 tBX_RET 14, $noreg 442 443 bb.6.b7: 444 liveins: $lr, $r7 445 446 tTAILJMPdND @extfunc, 14, $noreg, implicit $sp, implicit $sp 447 448... 449--- 450name: test_minsize 451alignment: 2 452exposesReturnsTwice: false 453legalized: false 454regBankSelected: false 455selected: false 456failedISel: false 457tracksRegLiveness: true 458hasWinCFI: false 459registers: [] 460liveins: [] 461frameInfo: 462 isFrameAddressTaken: false 463 isReturnAddressTaken: false 464 hasStackMap: false 465 hasPatchPoint: false 466 stackSize: 8 467 offsetAdjustment: 0 468 maxAlignment: 4 469 adjustsStack: true 470 hasCalls: true 471 stackProtector: '' 472 maxCallFrameSize: 0 473 cvBytesOfCalleeSavedRegisters: 0 474 hasOpaqueSPAdjustment: false 475 hasVAStart: false 476 hasMustTailInVarArgFunc: false 477 localFrameSize: 0 478 savePoint: '' 479 restorePoint: '' 480fixedStack: [] 481stack: 482 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4, 483 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true, 484 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 485 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4, 486 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true, 487 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 488callSites: [] 489constants: [] 490machineFunctionInfo: {} 491body: | 492 ; CHECK-V7-LABEL: name: test_minsize 493 ; CHECK-V7: bb.0 (%ir-block.0): 494 ; CHECK-V7: successors: %bb.1(0x50000000), %bb.6(0x30000000) 495 ; CHECK-V7: liveins: $lr, $r7 496 ; CHECK-V7: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 497 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 498 ; CHECK-V7: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 499 ; CHECK-V7: bb.1.b1: 500 ; CHECK-V7: successors: %bb.3(0x40000000), %bb.2(0x40000000) 501 ; CHECK-V7: liveins: $r7, $lr 502 ; CHECK-V7: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 503 ; CHECK-V7: frame-setup CFI_INSTRUCTION def_cfa_offset 8 504 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $lr, -4 505 ; CHECK-V7: frame-setup CFI_INSTRUCTION offset $r7, -8 506 ; CHECK-V7: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 507 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 508 ; CHECK-V7: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 509 ; CHECK-V7: bb.2.b2: 510 ; CHECK-V7: successors: %bb.4(0x80000000) 511 ; CHECK-V7: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 512 ; CHECK-V7: t2B %bb.4, 14 /* CC::al */, $noreg 513 ; CHECK-V7: bb.3.b3: 514 ; CHECK-V7: successors: %bb.4(0x80000000) 515 ; CHECK-V7: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 516 ; CHECK-V7: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 517 ; CHECK-V7: bb.4.b5: 518 ; CHECK-V7: successors: %bb.5(0x30000000), %bb.6(0x50000000) 519 ; CHECK-V7: liveins: $r0 520 ; CHECK-V7: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 521 ; CHECK-V7: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 522 ; CHECK-V7: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 523 ; CHECK-V7: bb.5.b8: 524 ; CHECK-V7: liveins: $lr, $r7 525 ; CHECK-V7: tBX_RET 14 /* CC::al */, $noreg 526 ; CHECK-V7: bb.6.b7: 527 ; CHECK-V7: liveins: $lr, $r7 528 ; CHECK-V7: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 529 ; CHECK-V8-LABEL: name: test_minsize 530 ; CHECK-V8: bb.0 (%ir-block.0): 531 ; CHECK-V8: successors: %bb.1(0x50000000), %bb.6(0x30000000) 532 ; CHECK-V8: liveins: $lr, $r7 533 ; CHECK-V8: renamable $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg 534 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 535 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 536 ; CHECK-V8: bb.1.b1: 537 ; CHECK-V8: successors: %bb.3(0x40000000), %bb.2(0x40000000) 538 ; CHECK-V8: liveins: $r7, $lr 539 ; CHECK-V8: $sp = frame-setup t2STMDB_UPD $sp, 14 /* CC::al */, $noreg, killed $r7, killed $lr 540 ; CHECK-V8: frame-setup CFI_INSTRUCTION def_cfa_offset 8 541 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $lr, -4 542 ; CHECK-V8: frame-setup CFI_INSTRUCTION offset $r7, -8 543 ; CHECK-V8: renamable $r0 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg 544 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 545 ; CHECK-V8: t2Bcc %bb.3, 1 /* CC::ne */, killed $cpsr 546 ; CHECK-V8: bb.2.b2: 547 ; CHECK-V8: successors: %bb.4(0x80000000) 548 ; CHECK-V8: tBL 14 /* CC::al */, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 549 ; CHECK-V8: t2B %bb.4, 14 /* CC::al */, $noreg 550 ; CHECK-V8: bb.3.b3: 551 ; CHECK-V8: successors: %bb.4(0x80000000) 552 ; CHECK-V8: renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14 /* CC::al */, $noreg :: (load 4 from `i32* undef`) 553 ; CHECK-V8: renamable $r0 = t2ANDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg 554 ; CHECK-V8: bb.4.b5: 555 ; CHECK-V8: successors: %bb.5(0x30000000), %bb.6(0x50000000) 556 ; CHECK-V8: liveins: $r0 557 ; CHECK-V8: t2CMPri killed renamable $r0, 0, 14 /* CC::al */, $noreg, implicit-def $cpsr 558 ; CHECK-V8: $sp = t2LDMIA_UPD $sp, 14 /* CC::al */, $noreg, def $r7, def $lr 559 ; CHECK-V8: t2Bcc %bb.6, 1 /* CC::ne */, killed $cpsr 560 ; CHECK-V8: bb.5.b8: 561 ; CHECK-V8: liveins: $lr, $r7 562 ; CHECK-V8: tBX_RET 14 /* CC::al */, $noreg 563 ; CHECK-V8: bb.6.b7: 564 ; CHECK-V8: liveins: $lr, $r7 565 ; CHECK-V8: tTAILJMPdND @extfunc, 14 /* CC::al */, $noreg, implicit $sp, implicit $sp 566 bb.0 (%ir-block.0): 567 successors: %bb.1(0x50000000), %bb.6(0x30000000) 568 liveins: $lr, $r7 569 570 renamable $r0 = t2MOVi 1, 14, $noreg, $noreg 571 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 572 t2Bcc %bb.6, 1, killed $cpsr 573 574 bb.1.b1: 575 successors: %bb.3(0x40000000), %bb.2(0x40000000) 576 liveins: $r7, $lr 577 578 $sp = frame-setup t2STMDB_UPD $sp, 14, $noreg, killed $r7, killed $lr 579 frame-setup CFI_INSTRUCTION def_cfa_offset 8 580 frame-setup CFI_INSTRUCTION offset $lr, -4 581 frame-setup CFI_INSTRUCTION offset $r7, -8 582 renamable $r0 = t2MOVi 0, 14, $noreg, $noreg 583 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 584 t2Bcc %bb.3, 1, killed $cpsr 585 586 bb.2.b2: 587 successors: %bb.4(0x80000000) 588 589 tBL 14, $noreg, @extfunc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0 590 t2B %bb.4, 14, $noreg 591 592 bb.3.b3: 593 successors: %bb.4(0x80000000) 594 595 renamable $r0 = t2LDRi12 undef renamable $r0, 0, 14, $noreg :: (load 4 from `i32* undef`) 596 renamable $r0 = t2ANDri killed renamable $r0, 256, 14, $noreg, $noreg 597 598 bb.4.b5: 599 successors: %bb.5(0x30000000), %bb.6(0x50000000) 600 liveins: $r0 601 602 t2CMPri killed renamable $r0, 0, 14, $noreg, implicit-def $cpsr 603 $sp = t2LDMIA_UPD $sp, 14, $noreg, def $r7, def $lr 604 t2Bcc %bb.6, 1, killed $cpsr 605 606 bb.5.b8: 607 liveins: $lr, $r7 608 609 tBX_RET 14, $noreg 610 611 bb.6.b7: 612 liveins: $lr, $r7 613 614 tTAILJMPdND @extfunc, 14, $noreg, implicit $sp, implicit $sp 615 616... 617