diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2011-01-29 04:46:23 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-29 04:46:23 +0000 |
| commit | d983eba7dc16a56e51a593e333caad9889b44af6 (patch) | |
| tree | 81af2594cbbd40a03a4816eca003bac2810e5035 /llvm/test/Transforms/JumpThreading/and-and-cond.ll | |
| parent | 754ab98fae3b5955779b9d556a78b9c7f13e53e7 (diff) | |
| download | bcm5719-llvm-d983eba7dc16a56e51a593e333caad9889b44af6.tar.gz bcm5719-llvm-d983eba7dc16a56e51a593e333caad9889b44af6.zip | |
Re-apply r124518 with fix. Watch out for invalidated iterator.
llvm-svn: 124526
Diffstat (limited to 'llvm/test/Transforms/JumpThreading/and-and-cond.ll')
| -rw-r--r-- | llvm/test/Transforms/JumpThreading/and-and-cond.ll | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/test/Transforms/JumpThreading/and-and-cond.ll b/llvm/test/Transforms/JumpThreading/and-and-cond.ll index e6db9ee5a32..765d940cc7c 100644 --- a/llvm/test/Transforms/JumpThreading/and-and-cond.ll +++ b/llvm/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 |

