aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/JumpThreading/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-20 20:27:49 +0000
committerChris Lattner <sabre@nondot.org>2009-10-20 20:27:49 +0000
commit88a8624f8e104e1ba1ca21efa6ae23680b528a3e (patch)
treee8cfa16cbd8c20a0304d8cfa3bb4d13575f86053 /test/Transforms/JumpThreading/crash.ll
parent18ed9c9a2bd7f1f56129495b499264c58b5cc4f4 (diff)
downloadexternal_llvm-88a8624f8e104e1ba1ca21efa6ae23680b528a3e.zip
external_llvm-88a8624f8e104e1ba1ca21efa6ae23680b528a3e.tar.gz
external_llvm-88a8624f8e104e1ba1ca21efa6ae23680b528a3e.tar.bz2
alternate fix for PR5258 which avoids worklist problems, with reduced testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/crash.ll')
-rw-r--r--test/Transforms/JumpThreading/crash.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll
index 0b6cd27..023c7d0 100644
--- a/test/Transforms/JumpThreading/crash.ll
+++ b/test/Transforms/JumpThreading/crash.ll
@@ -54,3 +54,38 @@ bb15:
bb61:
ret void
}
+
+
+; PR5258
+define i32 @test(i1 %cond, i1 %cond2, i32 %a) {
+A:
+ br i1 %cond, label %F, label %A1
+F:
+ br label %A1
+
+A1:
+ %d = phi i1 [false, %A], [true, %F]
+ %e = add i32 %a, %a
+ br i1 %d, label %B, label %G
+
+G:
+ br i1 %cond2, label %B, label %D
+
+B:
+ %f = phi i32 [%e, %G], [%e, %A1]
+ %b = add i32 0, 0
+ switch i32 %a, label %C [
+ i32 7, label %D
+ i32 8, label %D
+ i32 9, label %D
+ ]
+
+C:
+ br label %D
+
+D:
+ %c = phi i32 [%e, %B], [%e, %B], [%e, %B], [%f, %C], [%e, %G]
+ ret i32 %c
+E:
+ ret i32 412
+} \ No newline at end of file