aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/JumpThreading/basic.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-11 03:55:30 +0000
committerChris Lattner <sabre@nondot.org>2009-10-11 03:55:30 +0000
commit41fb43bb1ee294e451b6e42ae09af2aa44fc59e2 (patch)
tree9f48bf2b831f47ab84777ddb889dcdd035e7fb25 /test/Transforms/JumpThreading/basic.ll
parentd98eb44ddea257802f597b198d07108a3a4c9c32 (diff)
downloadexternal_llvm-41fb43bb1ee294e451b6e42ae09af2aa44fc59e2.zip
external_llvm-41fb43bb1ee294e451b6e42ae09af2aa44fc59e2.tar.gz
external_llvm-41fb43bb1ee294e451b6e42ae09af2aa44fc59e2.tar.bz2
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/basic.ll')
-rw-r--r--test/Transforms/JumpThreading/basic.ll20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/Transforms/JumpThreading/basic.ll b/test/Transforms/JumpThreading/basic.ll
index 16c3418..1a602a6 100644
--- a/test/Transforms/JumpThreading/basic.ll
+++ b/test/Transforms/JumpThreading/basic.ll
@@ -6,7 +6,9 @@ declare i32 @f1()
declare i32 @f2()
declare void @f3()
-define i32 @test(i1 %cond) {
+define i32 @test1(i1 %cond) {
+; CHECK: @test1
+
br i1 %cond, label %T1, label %F1
T1:
@@ -37,6 +39,7 @@ F2:
;; cond is known false on Entry -> F1 edge!
define i32 @test2(i1 %cond) {
+; CHECK: @test2
Entry:
br i1 %cond, label %T1, label %F1
@@ -57,3 +60,18 @@ F2:
call void @f3()
ret i32 12
}
+
+
+; Undef handling.
+define i32 @test3(i1 %cond) {
+; CHECK: @test3
+; CHECK-NEXT: T1:
+; CHECK-NEXT: ret i32 42
+ br i1 undef, label %T1, label %F1
+
+T1:
+ ret i32 42
+
+F1:
+ ret i32 17
+}