Change tests to use testrunner
authorChris Lattner <sabre@nondot.org>
Thu, 29 May 2003 15:16:10 +0000 (15:16 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 29 May 2003 15:16:10 +0000 (15:16 +0000)
new test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6399 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/Inline/Makefile
test/Transforms/Inline/alloca_test.ll [new file with mode: 0644]
test/Transforms/Inline/basictest.ll

index e6067bb43a35e1f55b376a0e7df1e1c28981b32c..91acd4d481b90c9755d331a529f345dcd67482f5 100644 (file)
@@ -4,9 +4,7 @@ include $(LEVEL)/test/Makefile.tests
 
 TESTS := $(wildcard *.ll)
 
-all:: $(addprefix Output/, $(TESTS:%.ll=%.ibc))
-
-Output/%.ibc: %.ll Output/.dir $(LOPT)
-       ($(LAS) < $< | $(LOPT) -inline -q -f -o $@) || \
-           ( rm -f $@; $(FAILURE) $@ )
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
 
+Output/%.ll.out: %.ll Output/.dir $(LOPT)
+       -$(TESTRUNR) $<
diff --git a/test/Transforms/Inline/alloca_test.ll b/test/Transforms/Inline/alloca_test.ll
new file mode 100644 (file)
index 0000000..8bd9575
--- /dev/null
@@ -0,0 +1,19 @@
+; This test ensures that alloca instructions in the entry block for an inlined
+; function are moved to the top of the function they are inlined into.
+;
+; RUN: as < %s | opt -inline | dis | grep -C 1 alloca | grep Entry:
+
+int %func(int %i) {
+       %X = alloca int 
+       ret int %i
+}
+
+declare void %bar()
+
+int %main(int %argc) {
+Entry:
+       call void %bar()
+       %X = call int %func(int 7)
+       %Y = add int %X, %argc
+       ret int %Y
+}
index ba79998c1b6595bff89ff1a17dee7cd2995d8884..f12d00c364ef04a7e1ebe41be1cf905e40407b8c 100644 (file)
@@ -1,4 +1,4 @@
-
+; RUN: as < %s | opt -inline -disable-output -print
 
 int %func(int %i) {
        ret int %i