Checkin simple testcases for LLVM-JIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-10-25 23:01:51 +00:00
parent 3d7771a387
commit 1405ec0ce1
6 changed files with 49 additions and 0 deletions

23
test/Jello/Makefile Normal file
View File

@ -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) $<

4
test/Jello/test0.ll Normal file
View File

@ -0,0 +1,4 @@
; test ret
void %main() {
ret void
}

4
test/Jello/test1.ll Normal file
View File

@ -0,0 +1,4 @@
; test ret of an integer
int %main() {
ret int 0
}

5
test/Jello/test2.ll Normal file
View File

@ -0,0 +1,5 @@
; test a simple add
int %main() {
%X = add int 1, 2
ret int %X
}

6
test/Jello/test3.ll Normal file
View File

@ -0,0 +1,6 @@
; test unconditional branch
int %main() {
br label %Test
Test:
ret int 0
}

7
test/Jello/test4.ll Normal file
View File

@ -0,0 +1,7 @@
; test phi node
int %main() {
br label %Test
Test:
%X = phi int [7, %0]
ret int %X
}