aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalOpt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-04 05:04:53 +0000
committerChris Lattner <sabre@nondot.org>2008-01-04 05:04:53 +0000
commitad8665a2a2d76a04248b89fb746350beadcc05c1 (patch)
treede9be4368bf91536b79b255865f43a655b46ddf5 /test/Transforms/GlobalOpt
parentda56ecaf71f8b7fe97fb66c4537cf431cfe078a1 (diff)
downloadexternal_llvm-ad8665a2a2d76a04248b89fb746350beadcc05c1.zip
external_llvm-ad8665a2a2d76a04248b89fb746350beadcc05c1.tar.gz
external_llvm-ad8665a2a2d76a04248b89fb746350beadcc05c1.tar.bz2
Fix PR1896
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r--test/Transforms/GlobalOpt/2008-01-03-Crash.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/2008-01-03-Crash.ll b/test/Transforms/GlobalOpt/2008-01-03-Crash.ll
new file mode 100644
index 0000000..3d8c77d
--- /dev/null
+++ b/test/Transforms/GlobalOpt/2008-01-03-Crash.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis
+; PR1896
+
+@indirect1 = internal global void (i32)* null ; <void (i32)**> [#uses=2]
+
+declare void @indirectmarked(i32)
+
+define i32 @main() {
+entry:
+ br i1 false, label %cond_next20.i, label %cond_true.i9
+
+cond_true.i9: ; preds = %entry
+ ret i32 0
+
+cond_next20.i: ; preds = %entry
+ store void (i32)* @indirectmarked, void (i32)** @indirect1, align 4
+ br i1 false, label %cond_next21.i.i23.i, label %stack_restore
+
+stack_restore: ; preds = %cond_next20.i
+ ret i32 0
+
+cond_next21.i.i23.i: ; preds = %cond_next20.i
+ %tmp6.i4.i = load i32* bitcast (void (i32)** @indirect1 to i32*), align 4 ; <i32> [#uses=0]
+ ret i32 0
+}
+