aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-28 18:21:05 +0000
committerChris Lattner <sabre@nondot.org>2002-03-28 18:21:05 +0000
commitc4d5fec26fb35ccd6dafa8aafbc6e8dd6c6e5c39 (patch)
treeb828244a8298f786bc51f03c7564a53caa03a42c /test
parentbfd3a6afb06f30fa791090727538678c1067b450 (diff)
downloadexternal_llvm-c4d5fec26fb35ccd6dafa8aafbc6e8dd6c6e5c39.zip
external_llvm-c4d5fec26fb35ccd6dafa8aafbc6e8dd6c6e5c39.tar.gz
external_llvm-c4d5fec26fb35ccd6dafa8aafbc6e8dd6c6e5c39.tar.bz2
Initial checkin of first regression test for mem2reg pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll13
-rw-r--r--test/Transforms/Mem2Reg/Makefile10
2 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll b/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
new file mode 100644
index 0000000..0eded43
--- /dev/null
+++ b/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
@@ -0,0 +1,13 @@
+; Uninitialized values are not handled correctly.
+;
+; RUN: as < %s | opt -mem2reg
+;
+
+implementation
+
+int "test"()
+begin
+ %X = alloca int ; To be promoted
+ %Y = load int* %X
+ ret int %Y
+end
diff --git a/test/Transforms/Mem2Reg/Makefile b/test/Transforms/Mem2Reg/Makefile
new file mode 100644
index 0000000..91acd4d
--- /dev/null
+++ b/test/Transforms/Mem2Reg/Makefile
@@ -0,0 +1,10 @@
+
+LEVEL = ../../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
+
+Output/%.ll.out: %.ll Output/.dir $(LOPT)
+ -$(TESTRUNR) $<