1 # RUN: llc -mtriple=thumbv6m--eabi -verify-machineinstrs -run-pass=arm-ldst-opt %s -o - | FileCheck %s
3 # Make sure bb.0 isn't transformed: it would incorrectly clobber CPSR.
5 # Make sure bb.1 is transformed, so the test doesn't accidentally break.
8 # CHECK: renamable $r0 = tLDRi renamable $r4, 0, 14 /* CC::al */, $noreg :: (load (s32))
9 # CHECK: renamable $r1 = tLDRi renamable $r4, 1, 14 /* CC::al */, $noreg :: (load (s32))
12 # CHECK: $r4 = tLDMIA_UPD $r4, 14 /* CC::al */, $noreg, def $r0, def $r1
13 # CHECK: $r4, dead $cpsr = tSUBi8 $r4, 8, 14 /* CC::al */, $noreg
16 tracksRegLiveness: true
20 renamable $r0 = tLDRi renamable $r2, 4, 14, $noreg :: (load (s32))
21 dead renamable $r0, $cpsr = tADDi3 killed renamable $r0, 1, 14, $noreg
22 renamable $r0 = tLDRi renamable $r4, 0, 14, $noreg :: (load (s32))
23 renamable $r1 = tLDRi renamable $r4, 1, 14, $noreg :: (load (s32))
24 tBcc %bb.1, 0, killed $cpsr
27 renamable $r0 = tLDRi renamable $r2, 4, 14, $noreg :: (load (s32))
28 dead renamable $r0, $cpsr = tADDi3 killed renamable $r0, 1, 14, $noreg
29 renamable $r0 = tLDRi renamable $r4, 0, 14, $noreg :: (load (s32))
30 renamable $r1 = tLDRi renamable $r4, 1, 14, $noreg :: (load (s32))