summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopStrengthReduce
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-08-14 05:19:07 +0000
committerNadav Rotem <nrotem@apple.com>2012-08-14 05:19:07 +0000
commit70409991bc92beaced7a9abb7c5f2f1e30cc3721 (patch)
treedef3a79a70ea6635a6c9cab07672ba229a85783a /llvm/test/Transforms/LoopStrengthReduce
parent160522c25acd8508903feea0f7fbb45b324ffcdf (diff)
downloadbcm5719-llvm-70409991bc92beaced7a9abb7c5f2f1e30cc3721.tar.gz
bcm5719-llvm-70409991bc92beaced7a9abb7c5f2f1e30cc3721.zip
During the CodeGenPrepare we often lower intrinsics (such as objsize)
and allow some optimizations to turn conditional branches into unconditional. This commit adds a simple control-flow optimization which merges two consecutive basic blocks which are connected by a single edge. This allows the codegen to operate on larger basic blocks. rdar://11973998 llvm-svn: 161852
Diffstat (limited to 'llvm/test/Transforms/LoopStrengthReduce')
-rw-r--r--llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll b/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
index 70ead330c10..b5124ea6f30 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll
@@ -44,7 +44,7 @@ declare %s* @getstruct() nounwind
; CHECK: @main
; Check that the loop preheader contains no address computation.
-; CHECK: %entry
+; CHECK: %end_of_chain
; CHECK-NOT: add{{.*}}lsl
; CHECK: ldr{{.*}}lsl #2
; CHECK: ldr{{.*}}lsl #2
@@ -65,15 +65,15 @@ while.cond:
while.body:
%v3 = load i32* @ncol, align 4, !tbaa !0
- br label %while.cond.i
+ br label %end_of_chain
-while.cond.i:
+end_of_chain:
%state.i = getelementptr inbounds %s* %call18, i32 0, i32 0
%v4 = load i32** %state.i, align 4, !tbaa !3
br label %while.cond.i.i
while.cond.i.i:
- %counter.0.i.i = phi i32 [ %v3, %while.cond.i ], [ %dec.i.i, %land.rhs.i.i ]
+ %counter.0.i.i = phi i32 [ %v3, %end_of_chain ], [ %dec.i.i, %land.rhs.i.i ]
%dec.i.i = add nsw i32 %counter.0.i.i, -1
%tobool.i.i = icmp eq i32 %counter.0.i.i, 0
br i1 %tobool.i.i, label %where.exit, label %land.rhs.i.i
OpenPOWER on IntegriCloud