1# RUN: llc -run-pass arm-prera-ldst-opt %s -o - | FileCheck %s 2--- | 3 target triple = "thumbv7---eabi" 4 5 define void @a(i32* nocapture %x, i32 %y, i32 %z) { 6 entry: 7 ret void 8 } 9 10 define void @b(i32* nocapture %x, i32 %y, i32 %z) { 11 entry: 12 ret void 13 } 14... 15--- 16# CHECK-LABEL: name: a 17name: a 18alignment: 1 19tracksRegLiveness: true 20liveins: 21 - { reg: '$r0', virtual-reg: '%0' } 22 - { reg: '$r1', virtual-reg: '%1' } 23 - { reg: '$r2', virtual-reg: '%2' } 24body: | 25 bb.0.entry: 26 liveins: $r0, $r1, $r2 27 28 %2 : rgpr = COPY $r2 29 %1 : rgpr = COPY $r1 30 %0 : gpr = COPY $r0 31 %3 : rgpr = t2MUL %2, %2, 14, $noreg 32 %4 : rgpr = t2MUL %1, %1, 14, $noreg 33 %5 : rgpr = t2MOVi32imm -858993459 34 %6 : rgpr, %7 : rgpr = t2UMULL killed %3, %5, 14, $noreg 35 %8 : rgpr, %9 : rgpr = t2UMULL killed %4, %5, 14, $noreg 36 t2STRi12 %1, %0, 0, 14, $noreg :: (store 4) 37 %10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg 38 t2STRi12 killed %10, %0, 4, 14, $noreg :: (store 4) 39 40 ; Make sure we move the paired stores next to each other, and 41 ; insert them in an appropriate location. 42 ; CHECK: t2STRi12 %1, 43 ; CHECK-NEXT: t2STRi12 killed %10, 44 ; CHECK-NEXT: t2MOVi 45 ; CHECK-NEXT: t2ADDrs 46 47 %11 : rgpr = t2MOVi 55, 14, $noreg, $noreg 48 %12 : gprnopc = t2ADDrs %11, killed %7, 19, 14, $noreg, $noreg 49 t2STRi12 killed %12, %0, 16, 14, $noreg :: (store 4) 50 %13 : gprnopc = t2ADDrs %11, killed %9, 19, 14, $noreg, $noreg 51 t2STRi12 killed %13, %0, 20, 14, $noreg :: (store 4) 52 53 ; Make sure we move the paired stores next to each other. 54 ; CHECK: t2STRi12 killed %12, 55 ; CHECK-NEXT: t2STRi12 killed %13, 56 57 tBX_RET 14, $noreg 58--- 59# CHECK-LABEL: name: b 60name: b 61alignment: 1 62tracksRegLiveness: true 63liveins: 64 - { reg: '$r0', virtual-reg: '%0' } 65 - { reg: '$r1', virtual-reg: '%1' } 66 - { reg: '$r2', virtual-reg: '%2' } 67body: | 68 bb.0.entry: 69 liveins: $r0, $r1, $r2 70 71 %2 : rgpr = COPY $r2 72 %1 : rgpr = COPY $r1 73 %0 : gpr = COPY $r0 74 t2STRi12 %1, %0, 0, 14, $noreg :: (store 4) 75 %10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg 76 t2STRi12 killed %10, %0, 4, 14, $noreg :: (store 4) 77 %3 : rgpr = t2MUL %2, %2, 14, $noreg 78 t2STRi12 %3, %0, 8, 14, $noreg :: (store 4) 79 80 ; Make sure we move the paired stores next to each other, and 81 ; insert them in an appropriate location. 82 ; CHECK: t2STRi12 {{.*}}, 0 83 ; CHECK-NEXT: t2STRi12 {{.*}}, 4 84 ; CHECK-NEXT: t2STRi12 {{.*}}, 8 85 ; CHECK-NEXT: t2MUL 86 ; CHECK-NEXT: t2MOVi32imm 87 88 %4 : rgpr = t2MUL %1, %1, 14, $noreg 89 %5 : rgpr = t2MOVi32imm -858993459 90 %6 : rgpr, %7 : rgpr = t2UMULL killed %3, %5, 14, $noreg 91 %8 : rgpr, %9 : rgpr = t2UMULL killed %4, %5, 14, $noreg 92 %10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg 93 %11 : rgpr = t2MOVi 55, 14, $noreg, $noreg 94 %12 : gprnopc = t2ADDrs %11, killed %7, 19, 14, $noreg, $noreg 95 t2STRi12 killed %12, %0, 16, 14, $noreg :: (store 4) 96 %13 : gprnopc = t2ADDrs %11, killed %9, 19, 14, $noreg, $noreg 97 t2STRi12 killed %13, %0, 20, 14, $noreg :: (store 4) 98 99 ; Make sure we move the paired stores next to each other. 100 ; CHECK: t2STRi12 {{.*}}, 16 101 ; CHECK-NEXT: t2STRi12 {{.*}}, 20 102 103 tBX_RET 14, $noreg 104 105... 106