summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/JumpThreading/crash.ll
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
commit329ea064edad3375e00e011224132eb3acf6b1c8 (patch)
treec2f5c8615f056f43c68a40173089def5db0cd3de /llvm/test/Transforms/JumpThreading/crash.ll
parent37b827fd118c5daae7b469cb88bf0430b5605f57 (diff)
downloadbcm5719-llvm-329ea064edad3375e00e011224132eb3acf6b1c8.tar.gz
bcm5719-llvm-329ea064edad3375e00e011224132eb3acf6b1c8.zip
jump threading can't split a critical edge from an indirectbr. This
fixes PR7356. llvm-svn: 105950
Diffstat (limited to 'llvm/test/Transforms/JumpThreading/crash.ll')
-rw-r--r--llvm/test/Transforms/JumpThreading/crash.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/JumpThreading/crash.ll b/llvm/test/Transforms/JumpThreading/crash.ll
index 21620bef9cc..378c51a44a7 100644
--- a/llvm/test/Transforms/JumpThreading/crash.ll
+++ b/llvm/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
+}
+
OpenPOWER on IntegriCloud