From: Chris Lattner Date: Fri, 25 Oct 2002 23:01:51 +0000 (+0000) Subject: Checkin simple testcases for LLVM-JIT X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1405ec0ce19e95555337aaf1f9d66a56394aed6e;p=oota-llvm.git Checkin simple testcases for LLVM-JIT git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4288 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Jello/Makefile b/test/Jello/Makefile new file mode 100644 index 00000000000..a9053845d94 --- /dev/null +++ b/test/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/Jello/test0.ll b/test/Jello/test0.ll new file mode 100644 index 00000000000..1f916c6542d --- /dev/null +++ b/test/Jello/test0.ll @@ -0,0 +1,4 @@ +; test ret +void %main() { + ret void +} diff --git a/test/Jello/test1.ll b/test/Jello/test1.ll new file mode 100644 index 00000000000..142f2e81236 --- /dev/null +++ b/test/Jello/test1.ll @@ -0,0 +1,4 @@ +; test ret of an integer +int %main() { + ret int 0 +} diff --git a/test/Jello/test2.ll b/test/Jello/test2.ll new file mode 100644 index 00000000000..f5d1a4ee360 --- /dev/null +++ b/test/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/Jello/test3.ll b/test/Jello/test3.ll new file mode 100644 index 00000000000..27c5f4179d1 --- /dev/null +++ b/test/Jello/test3.ll @@ -0,0 +1,6 @@ +; test unconditional branch +int %main() { + br label %Test +Test: + ret int 0 +} diff --git a/test/Jello/test4.ll b/test/Jello/test4.ll new file mode 100644 index 00000000000..a406184d805 --- /dev/null +++ b/test/Jello/test4.ll @@ -0,0 +1,7 @@ +; test phi node +int %main() { + br label %Test +Test: + %X = phi int [7, %0] + ret int %X +}