summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopUnroll/runtime-li.ll
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-06-26 09:16:57 +0000
committerFlorian Hahn <flo@fhahn.com>2019-06-26 09:16:57 +0000
commit4c11b5268ca295b156159bed9d520fcb85fcf068 (patch)
treed13a913da4f35d28152d49cba61539bb8f663f03 /llvm/test/Transforms/LoopUnroll/runtime-li.ll
parent46ce9e4fff45e9f744d8424f00386d650975fd31 (diff)
downloadbcm5719-llvm-4c11b5268ca295b156159bed9d520fcb85fcf068.tar.gz
bcm5719-llvm-4c11b5268ca295b156159bed9d520fcb85fcf068.zip
[LoopUnroll] Add support for loops with exiting headers and uncond latches.
This patch generalizes the UnrollLoop utility to support loops that exit from the header instead of the latch. Usually, LoopRotate would take care of must of those cases, but in some cases (e.g. -Oz), LoopRotate does not kick in. Codesize impact looks relatively neutral on ARM64 with -Oz + LTO. Program master patch diff External/S.../CFP2006/447.dealII/447.dealII 629060.00 627676.00 -0.2% External/SPEC/CINT2000/176.gcc/176.gcc 1245916.00 1244932.00 -0.1% MultiSourc...Prolangs-C/simulator/simulator 86100.00 86156.00 0.1% MultiSourc...arks/Rodinia/backprop/backprop 66212.00 66252.00 0.1% MultiSourc...chmarks/Prolangs-C++/life/life 67276.00 67312.00 0.1% MultiSourc...s/Prolangs-C/compiler/compiler 69824.00 69788.00 -0.1% MultiSourc...Prolangs-C/assembler/assembler 86672.00 86696.00 0.0% Reviewers: efriedma, vsk, paquette Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D61962 llvm-svn: 364398
Diffstat (limited to 'llvm/test/Transforms/LoopUnroll/runtime-li.ll')
-rw-r--r--llvm/test/Transforms/LoopUnroll/runtime-li.ll7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/Transforms/LoopUnroll/runtime-li.ll b/llvm/test/Transforms/LoopUnroll/runtime-li.ll
index 5494c8e9da7..a4a9b920289 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-li.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-li.ll
@@ -17,12 +17,15 @@ header.outer: ; preds = %latch.outer, %entry
br label %header.inner
header.inner: ; preds = %latch.inner, %header.outer
+ %tmp5 = load i64, i64* %q1, align 8
+ %tmp6 = icmp eq double* %p, %arg
+ br i1 undef, label %exiting.inner, label %latch.outer
+
+exiting.inner: ; preds = %latch.inner, %header.outer
br i1 undef, label %latch.inner, label %latch.outer
latch.inner: ; preds = %header.inner
- %tmp5 = load i64, i64* %q1, align 8
store i64 %tmp5, i64* %q2, align 8
- %tmp6 = icmp eq double* %p, %arg
br label %header.inner
latch.outer: ; preds = %header.inner
OpenPOWER on IntegriCloud