aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-29 15:16:10 +0000
committerChris Lattner <sabre@nondot.org>2003-05-29 15:16:10 +0000
commitc9c41ee9d0d57d69ecdb4c87df443d897302ba65 (patch)
tree8e124fca7b71beed88c530a372db6d36a521e98a /test
parente68e4d59e8a2532f71fe5c75a878f9f74e6a93b1 (diff)
downloadexternal_llvm-c9c41ee9d0d57d69ecdb4c87df443d897302ba65.zip
external_llvm-c9c41ee9d0d57d69ecdb4c87df443d897302ba65.tar.gz
external_llvm-c9c41ee9d0d57d69ecdb4c87df443d897302ba65.tar.bz2
Change tests to use testrunner
new test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/Inline/Makefile8
-rw-r--r--test/Transforms/Inline/alloca_test.ll19
-rw-r--r--test/Transforms/Inline/basictest.ll2
3 files changed, 23 insertions, 6 deletions
diff --git a/test/Transforms/Inline/Makefile b/test/Transforms/Inline/Makefile
index e6067bb..91acd4d 100644
--- a/test/Transforms/Inline/Makefile
+++ b/test/Transforms/Inline/Makefile
@@ -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
index 0000000..8bd9575
--- /dev/null
+++ b/test/Transforms/Inline/alloca_test.ll
@@ -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
+}
diff --git a/test/Transforms/Inline/basictest.ll b/test/Transforms/Inline/basictest.ll
index ba79998..f12d00c 100644
--- a/test/Transforms/Inline/basictest.ll
+++ b/test/Transforms/Inline/basictest.ll
@@ -1,4 +1,4 @@
-
+; RUN: as < %s | opt -inline -disable-output -print
int %func(int %i) {
ret int %i