summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/CodeGenPrepare
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/CodeGenPrepare
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/CodeGenPrepare')
-rw-r--r--llvm/test/Transforms/CodeGenPrepare/basic.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/Transforms/CodeGenPrepare/basic.ll b/llvm/test/Transforms/CodeGenPrepare/basic.ll
index ebf10f0e9df..c68e77eb555 100644
--- a/llvm/test/Transforms/CodeGenPrepare/basic.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/basic.ll
@@ -5,7 +5,7 @@ target triple = "x86_64-apple-darwin10.0.0"
; CHECK: @test1
; objectsize should fold to a constant, which causes the branch to fold to an
-; uncond branch.
+; uncond branch. Next, we fold the control flow alltogether.
; rdar://8785296
define i32 @test1(i8* %ptr) nounwind ssp noredzone align 2 {
entry:
@@ -13,8 +13,8 @@ entry:
%1 = icmp ugt i64 %0, 3
br i1 %1, label %T, label %trap
-; CHECK: entry:
-; CHECK-NEXT: br label %T
+; CHECK: T:
+; CHECK-NOT: br label %
trap: ; preds = %0, %entry
tail call void @llvm.trap() noreturn nounwind
OpenPOWER on IntegriCloud