diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2017-03-01 23:20:29 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2017-03-01 23:20:29 +0000 |
commit | 1c9216b003c88eefacac52a448ae9349a70e474a (patch) | |
tree | 5f6f3495a01522702618f7398ec846b56c270cc7 /llvm/test | |
parent | 923a32044199dc7aa01ace84470533355d5f3bc4 (diff) | |
download | bcm5719-llvm-1c9216b003c88eefacac52a448ae9349a70e474a.tar.gz bcm5719-llvm-1c9216b003c88eefacac52a448ae9349a70e474a.zip |
[ARM] Fix insert point for store rescheduling.
In ARMPreAllocLoadStoreOpt::RescheduleOps, LastOp should be the last
operation which we want to merge. If we break out of the loop because
an operation has the wrong offset, we shouldn't use that operation as
LastOp.
This patch fixes some cases where we would sink stores for no reason.
Differential Revision: https://reviews.llvm.org/D30124
llvm-svn: 296708
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir b/llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir index 1db38c8b004..eafcc7c36d3 100644 --- a/llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir +++ b/llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir @@ -36,6 +36,14 @@ body: | t2STRi12 %1, %0, 0, 14, _ :: (store 4) %10 : rgpr = t2LSLri %2, 1, 14, _, _ t2STRi12 killed %10, %0, 4, 14, _ :: (store 4) + + ; Make sure we move the paired stores next to each other, and + ; insert them in an appropriate location. + ; CHECK: t2STRi12 %1, + ; CHECK-NEXT: t2STRi12 killed %10, + ; CHECK-NEXT: t2MOVi + ; CHECK-NEXT: t2ADDrs + %11 : rgpr = t2MOVi 55, 14, _, _ %12 : gprnopc = t2ADDrs %11, killed %7, 19, 14, _, _ t2STRi12 killed %12, %0, 16, 14, _ :: (store 4) @@ -43,12 +51,7 @@ body: | t2STRi12 killed %13, %0, 20, 14, _ :: (store 4) ; Make sure we move the paired stores next to each other. - ; FIXME: Make sure we don't extend the live-range of a store - ; when we don't need to. - ; CHECK: t2STRi12 %1, - ; CHECK-NEXT: t2STRi12 killed %10, - ; CHECK-NEXT: %13 = t2ADDrs %11 - ; CHECK-NEXT: t2STRi12 killed %12, + ; CHECK: t2STRi12 killed %12, ; CHECK-NEXT: t2STRi12 killed %13, tBX_RET 14, _ @@ -73,6 +76,15 @@ body: | t2STRi12 killed %10, %0, 4, 14, _ :: (store 4) %3 : rgpr = t2MUL %2, %2, 14, _ t2STRi12 %3, %0, 8, 14, _ :: (store 4) + + ; Make sure we move the paired stores next to each other, and + ; insert them in an appropriate location. + ; CHECK: t2STRi12 {{.*}}, 0 + ; CHECK-NEXT: t2STRi12 {{.*}}, 4 + ; CHECK-NEXT: t2STRi12 {{.*}}, 8 + ; CHECK-NEXT: t2MUL + ; CHECK-NEXT: t2MOVi32imm + %4 : rgpr = t2MUL %1, %1, 14, _ %5 : rgpr = t2MOVi32imm -858993459 %6 : rgpr, %7 : rgpr = t2UMULL killed %3, %5, 14, _ @@ -85,13 +97,7 @@ body: | t2STRi12 killed %13, %0, 20, 14, _ :: (store 4) ; Make sure we move the paired stores next to each other. - ; FIXME: Make sure we don't extend the live-range of a store - ; when we don't need to. - ; CHECK: t2STRi12 {{.*}}, 0 - ; CHECK-NEXT: t2STRi12 {{.*}}, 4 - ; CHECK-NEXT: t2STRi12 {{.*}}, 8 - ; CHECK-NEXT: t2ADDrs - ; CHECK-NEXT: t2STRi12 {{.*}}, 16 + ; CHECK: t2STRi12 {{.*}}, 16 ; CHECK-NEXT: t2STRi12 {{.*}}, 20 tBX_RET 14, _ |