ADCE tests
authorChris Lattner <sabre@nondot.org>
Tue, 7 May 2002 20:51:59 +0000 (20:51 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 May 2002 20:51:59 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2544 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/ADCE/2002-01-31-UseStuckAround.ll [new file with mode: 0644]
test/Transforms/ADCE/Makefile [new file with mode: 0644]

diff --git a/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll b/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
new file mode 100644 (file)
index 0000000..7f62270
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: as < %s | opt -adce
+
+implementation
+
+int "main"(int %argc)
+begin
+       br label %2
+
+       %retval = phi int [ %argc, %2 ]         ; <int> [#uses=2]
+       %two = add int %retval, %retval         ; <int> [#uses=1]
+       ret int %two
+
+       br label %1
+end
+
diff --git a/test/Transforms/ADCE/Makefile b/test/Transforms/ADCE/Makefile
new file mode 100644 (file)
index 0000000..91acd4d
--- /dev/null
@@ -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) $<