Checkin simple testcases for LLVM-JIT

llvm-svn: 4288
This commit is contained in:
Chris Lattner 2002-10-25 23:01:51 +00:00
parent 4eae2fc3ad
commit eab61a23a7
6 changed files with 49 additions and 0 deletions

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

View File

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

View File

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

View File

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

View File

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

View File

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