summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/empty-load-store.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/Generic/empty-load-store.ll
Diffstat (limited to 'test/CodeGen/Generic/empty-load-store.ll')
-rw-r--r--test/CodeGen/Generic/empty-load-store.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/empty-load-store.ll b/test/CodeGen/Generic/empty-load-store.ll
new file mode 100644
index 0000000000000..d7bb37194e49f
--- /dev/null
+++ b/test/CodeGen/Generic/empty-load-store.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc
+; PR2612
+
+@current_foo = internal global { } zeroinitializer
+
+define i32 @foo() {
+entry:
+ %retval = alloca i32
+ store i32 0, i32* %retval
+ %local_foo = alloca { }
+ load { }* @current_foo
+ store { } %0, { }* %local_foo
+ br label %return
+
+return:
+ load i32* %retval
+ ret i32 %1
+}