summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-06-14 19:45:43 +0000
committerChris Lattner <sabre@nondot.org>2010-06-14 19:45:43 +0000
commite58867e55e472d81bbf5b1d26310a5b3918d2fb6 (patch)
tree923c53da4c118bdfa4116816dc23efd184ab8440 /test
parent12b8bc1b01c53d08d4d2774407035fd483577d7c (diff)
downloadllvm-e58867e55e472d81bbf5b1d26310a5b3918d2fb6.tar.gz
llvm-e58867e55e472d81bbf5b1d26310a5b3918d2fb6.tar.bz2
llvm-e58867e55e472d81bbf5b1d26310a5b3918d2fb6.tar.xz
jump threading can't split a critical edge from an indirectbr. This
fixes PR7356. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/JumpThreading/crash.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll
index 21620bef9c..378c51a44a 100644
--- a/test/Transforms/JumpThreading/crash.ll
+++ b/test/Transforms/JumpThreading/crash.ll
@@ -341,3 +341,25 @@ if.end12: ; preds = %if.then, %lbl_51
ret void
}
+
+
+; PR7356
+define i32 @test13(i32* %P, i8* %Ptr) {
+entry:
+ indirectbr i8* %Ptr, [label %BrBlock, label %B2]
+
+B2:
+ store i32 4, i32 *%P
+ br label %BrBlock
+
+BrBlock:
+ %L = load i32* %P
+ %C = icmp eq i32 %L, 42
+ br i1 %C, label %T, label %F
+
+T:
+ ret i32 123
+F:
+ ret i32 1422
+}
+