From 03ef2fc16758198af1f306762e75247416ea2c06 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 29 May 2003 15:16:10 +0000 Subject: [PATCH] Change tests to use testrunner new test llvm-svn: 6399 --- .../Regression/Transforms/Inline/Makefile | 8 +++----- .../Transforms/Inline/alloca_test.ll | 19 +++++++++++++++++++ .../Regression/Transforms/Inline/basictest.ll | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 llvm/test/Regression/Transforms/Inline/alloca_test.ll diff --git a/llvm/test/Regression/Transforms/Inline/Makefile b/llvm/test/Regression/Transforms/Inline/Makefile index e6067bb43a35..91acd4d481b9 100644 --- a/llvm/test/Regression/Transforms/Inline/Makefile +++ b/llvm/test/Regression/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/llvm/test/Regression/Transforms/Inline/alloca_test.ll b/llvm/test/Regression/Transforms/Inline/alloca_test.ll new file mode 100644 index 000000000000..8bd95756d76a --- /dev/null +++ b/llvm/test/Regression/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/llvm/test/Regression/Transforms/Inline/basictest.ll b/llvm/test/Regression/Transforms/Inline/basictest.ll index ba79998c1b65..f12d00c364ef 100644 --- a/llvm/test/Regression/Transforms/Inline/basictest.ll +++ b/llvm/test/Regression/Transforms/Inline/basictest.ll @@ -1,4 +1,4 @@ - +; RUN: as < %s | opt -inline -disable-output -print int %func(int %i) { ret int %i