diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:55:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:55:20 +0000 |
commit | a5810add9c94fd2faa037162d23b91348b55ea08 (patch) | |
tree | 7c53d3822defeeb8d0caec021926f6129f1a63e5 /test/Transforms/JumpThreading/basic.ll | |
parent | 8520149db158427339a235a74dd2cc19553a7328 (diff) | |
download | external_llvm-a5810add9c94fd2faa037162d23b91348b55ea08.zip external_llvm-a5810add9c94fd2faa037162d23b91348b55ea08.tar.gz external_llvm-a5810add9c94fd2faa037162d23b91348b55ea08.tar.bz2 |
We now thread some impossible condition information with LVI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/basic.ll')
-rw-r--r-- | test/Transforms/JumpThreading/basic.ll | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/Transforms/JumpThreading/basic.ll b/test/Transforms/JumpThreading/basic.ll index 4a1a286..89a38b2 100644 --- a/test/Transforms/JumpThreading/basic.ll +++ b/test/Transforms/JumpThreading/basic.ll @@ -321,14 +321,42 @@ F2: } +; Impossible conditional constraints should get threaded. BB3 is dead here. +define i32 @test11(i32 %A) { +; CHECK: @test11 +; CHECK-NEXT: icmp +; CHECK-NEXT: br i1 %tmp455, label %BB4, label %BB2 + %tmp455 = icmp eq i32 %A, 42 + br i1 %tmp455, label %BB1, label %BB2 + +BB2: +; CHECK: call i32 @f1() +; CHECK-NEXT: call void @f3() +; CHECK-NEXT: ret i32 4 + %C = call i32 @f1() + ret i32 %C + + +BB1: + %tmp459 = icmp eq i32 %A, 43 + br i1 %tmp459, label %BB3, label %BB4 + +BB3: + call i32 @f2() + ret i32 3 + +BB4: + call void @f3() + ret i32 4 +} ;;; Duplicate condition to avoid xor of cond. ;;; TODO: Make this happen. -define i32 @test11(i1 %cond, i1 %cond2) { +define i32 @testXX(i1 %cond, i1 %cond2) { Entry: -; CHECK: @test11 +; CHECK: @testXX %v1 = call i32 @f1() br i1 %cond, label %Merge, label %F1 |