aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/JumpThreading/and-cond.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-29 01:29:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-29 01:29:26 +0000
commit5e6940788fb2f8cf3ce4219d3ac0f78317f54696 (patch)
tree1bd84907741911ab97ccfede07b0fe05dcca2981 /test/Transforms/JumpThreading/and-cond.ll
parent04317cc618aeae28910916469e074d8ce0fcaa03 (diff)
downloadexternal_llvm-5e6940788fb2f8cf3ce4219d3ac0f78317f54696.zip
external_llvm-5e6940788fb2f8cf3ce4219d3ac0f78317f54696.tar.gz
external_llvm-5e6940788fb2f8cf3ce4219d3ac0f78317f54696.tar.bz2
Re-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional predecessor to enable TCE on demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/and-cond.ll')
-rw-r--r--test/Transforms/JumpThreading/and-cond.ll9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/Transforms/JumpThreading/and-cond.ll b/test/Transforms/JumpThreading/and-cond.ll
index 58dbec7..0159bb3 100644
--- a/test/Transforms/JumpThreading/and-cond.ll
+++ b/test/Transforms/JumpThreading/and-cond.ll
@@ -1,14 +1,14 @@
-; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg -S | grep {ret i32 %v1}
-; There should be no uncond branches left.
-; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg -S | not grep {br label}
+; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg -S | FileCheck %s
declare i32 @f1()
declare i32 @f2()
declare void @f3()
define i32 @test(i1 %cond, i1 %cond2) {
+; CHECK: test
br i1 %cond, label %T1, label %F1
+; CHECK-NOT: T1
T1:
%v1 = call i32 @f1()
br label %Merge
@@ -18,6 +18,9 @@ F1:
br label %Merge
Merge:
+; CHECK: Merge:
+; CHECK: %v1 = call i32 @f1()
+; CHECK-NEXT: br i1 %cond2
%A = phi i1 [true, %T1], [false, %F1]
%B = phi i32 [%v1, %T1], [%v2, %F1]
%C = and i1 %A, %cond2