Add a test for the fix in revision 91009.
authorEric Christopher <echristo@apple.com>
Thu, 10 Dec 2009 21:11:40 +0000 (21:11 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 10 Dec 2009 21:11:40 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91062 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll [new file with mode: 0644]

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 (file)
index 0000000..b350dfa
--- /dev/null
@@ -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