From 0a0e090e4e9631bbf2ef1ac62931f5b2be260f69 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Mar 2002 18:21:05 +0000 Subject: [PATCH] Initial checkin of first regression test for mem2reg pass llvm-svn: 2016 --- .../Mem2Reg/2002-03-28-UninitializedVal.ll | 13 +++++++++++++ llvm/test/Regression/Transforms/Mem2Reg/Makefile | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll create mode 100644 llvm/test/Regression/Transforms/Mem2Reg/Makefile diff --git a/llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll b/llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll new file mode 100644 index 000000000000..0eded43d8d96 --- /dev/null +++ b/llvm/test/Regression/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/llvm/test/Regression/Transforms/Mem2Reg/Makefile b/llvm/test/Regression/Transforms/Mem2Reg/Makefile new file mode 100644 index 000000000000..91acd4d481b9 --- /dev/null +++ b/llvm/test/Regression/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) $<