From eab61a23a7a4d73ab91bd3ad845415fbb7d8160c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 25 Oct 2002 23:01:51 +0000 Subject: [PATCH] Checkin simple testcases for LLVM-JIT llvm-svn: 4288 --- test/Regression/Jello/Makefile | 23 +++++++++++++++++++++++ test/Regression/Jello/test0.ll | 4 ++++ test/Regression/Jello/test1.ll | 4 ++++ test/Regression/Jello/test2.ll | 5 +++++ test/Regression/Jello/test3.ll | 6 ++++++ test/Regression/Jello/test4.ll | 7 +++++++ 6 files changed, 49 insertions(+) create mode 100644 test/Regression/Jello/Makefile create mode 100644 test/Regression/Jello/test0.ll create mode 100644 test/Regression/Jello/test1.ll create mode 100644 test/Regression/Jello/test2.ll create mode 100644 test/Regression/Jello/test3.ll create mode 100644 test/Regression/Jello/test4.ll diff --git a/test/Regression/Jello/Makefile b/test/Regression/Jello/Makefile new file mode 100644 index 00000000000..a9053845d94 --- /dev/null +++ b/test/Regression/Jello/Makefile @@ -0,0 +1,23 @@ +# test/Regression/Jello/Makefile +# +# This directory contains regression tests for the LLVM jello program. +# +LEVEL = ../../.. +include $(LEVEL)/test/Makefile.tests + +TESTS := $(wildcard *.ll) +FTESTS := $(wildcard *.llx) # Freeform tests + +all:: $(addprefix Output/, $(TESTS:%.ll=%.out)) + +Output/%.out: Output/%.bc + @echo "======== Running $< ===================" + $(VERB) jello $< > $@ 2>&1 || \ + ( cat $@; rm -f $@; $(FAILURE) $@ ) + + +all:: $(addprefix Output/, $(FTESTS:%.llx=%.llx.out)) + +Output/%.llx.out: %.llx Output/.dir $(LAS) + -$(TESTRUNR) $< + diff --git a/test/Regression/Jello/test0.ll b/test/Regression/Jello/test0.ll new file mode 100644 index 00000000000..1f916c6542d --- /dev/null +++ b/test/Regression/Jello/test0.ll @@ -0,0 +1,4 @@ +; test ret +void %main() { + ret void +} diff --git a/test/Regression/Jello/test1.ll b/test/Regression/Jello/test1.ll new file mode 100644 index 00000000000..142f2e81236 --- /dev/null +++ b/test/Regression/Jello/test1.ll @@ -0,0 +1,4 @@ +; test ret of an integer +int %main() { + ret int 0 +} diff --git a/test/Regression/Jello/test2.ll b/test/Regression/Jello/test2.ll new file mode 100644 index 00000000000..f5d1a4ee360 --- /dev/null +++ b/test/Regression/Jello/test2.ll @@ -0,0 +1,5 @@ +; test a simple add +int %main() { + %X = add int 1, 2 + ret int %X +} diff --git a/test/Regression/Jello/test3.ll b/test/Regression/Jello/test3.ll new file mode 100644 index 00000000000..27c5f4179d1 --- /dev/null +++ b/test/Regression/Jello/test3.ll @@ -0,0 +1,6 @@ +; test unconditional branch +int %main() { + br label %Test +Test: + ret int 0 +} diff --git a/test/Regression/Jello/test4.ll b/test/Regression/Jello/test4.ll new file mode 100644 index 00000000000..a406184d805 --- /dev/null +++ b/test/Regression/Jello/test4.ll @@ -0,0 +1,7 @@ +; test phi node +int %main() { + br label %Test +Test: + %X = phi int [7, %0] + ret int %X +}