summaryrefslogtreecommitdiff
path: root/test/Transforms/JumpThreading/and-and-cond.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-28 02:19:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-28 02:19:21 +0000
commit40f64cb0de40802ddd2f928b62e9564e1e721ff3 (patch)
treee94f9f5d77d86efd85ac2d6f0ad8a3ced55ca5ee /test/Transforms/JumpThreading/and-and-cond.ll
parentc3a20bab7571ff95525252c379198e67b65d0f1d (diff)
downloadllvm-40f64cb0de40802ddd2f928b62e9564e1e721ff3.tar.gz
llvm-40f64cb0de40802ddd2f928b62e9564e1e721ff3.tar.bz2
llvm-40f64cb0de40802ddd2f928b62e9564e1e721ff3.tar.xz
- Stop simplifycfg from duplicating "ret" instructions into unconditional
branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/and-and-cond.ll')
-rw-r--r--test/Transforms/JumpThreading/and-and-cond.ll10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/Transforms/JumpThreading/and-and-cond.ll b/test/Transforms/JumpThreading/and-and-cond.ll
index e6db9ee5a3..765d940cc7 100644
--- a/test/Transforms/JumpThreading/and-and-cond.ll
+++ b/test/Transforms/JumpThreading/and-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, i1 %cond3) {
+; CHECK: test
br i1 %cond, label %T1, label %F1
+; CHECK-NOT: T1:
T1:
%v1 = call i32 @f1()
br label %Merge
@@ -18,6 +18,10 @@ F1:
br label %Merge
Merge:
+; CHECK: Merge:
+; CHECK: %v1 = call i32 @f1()
+; CHECK-NEXT: %D = and i1 %cond2, %cond3
+; CHECK-NEXT: br i1 %D
%A = phi i1 [true, %T1], [false, %F1]
%B = phi i32 [%v1, %T1], [%v2, %F1]
%C = and i1 %A, %cond2