summaryrefslogtreecommitdiff
path: root/test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2009-12-10 21:11:40 +0000
committerEric Christopher <echristo@apple.com>2009-12-10 21:11:40 +0000
commit072f6fe196a1b6b9289a44a201b759fa72625b44 (patch)
tree658adcec6dff09e2f0edcfab454051ea670c6f63 /test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll
parent6fd78ec8a216f659ce7c0c9912bb81e29595fed9 (diff)
downloadllvm-072f6fe196a1b6b9289a44a201b759fa72625b44.tar.gz
llvm-072f6fe196a1b6b9289a44a201b759fa72625b44.tar.bz2
llvm-072f6fe196a1b6b9289a44a201b759fa72625b44.tar.xz
Add a test for the fix in revision 91009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll')
-rw-r--r--test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll b/test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll
new file mode 100644
index 0000000000..b350dfac37
--- /dev/null
+++ b/test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll
@@ -0,0 +1,20 @@
+; RUN: opt < %s -licm -disable-output
+define void @foo (i8* %v)
+{
+ entry:
+ br i1 undef, label %preheader, label %return
+
+ preheader:
+ br i1 undef, label %loop, label %return
+
+ loop:
+ indirectbr i8* undef, [label %preheader, label %stuff]
+
+ stuff:
+ %0 = load i8* undef, align 1
+ br label %loop
+
+ return:
+ ret void
+
+} \ No newline at end of file