Checkin simple testcases for LLVM-JIT
authorChris Lattner <sabre@nondot.org>
Fri, 25 Oct 2002 23:01:51 +0000 (23:01 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Oct 2002 23:01:51 +0000 (23:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4288 91177308-0d34-0410-b5e6-96231b3b80d8

test/Jello/Makefile [new file with mode: 0644]
test/Jello/test0.ll [new file with mode: 0644]
test/Jello/test1.ll [new file with mode: 0644]
test/Jello/test2.ll [new file with mode: 0644]
test/Jello/test3.ll [new file with mode: 0644]
test/Jello/test4.ll [new file with mode: 0644]

diff --git a/test/Jello/Makefile b/test/Jello/Makefile
new file mode 100644 (file)
index 0000000..a905384
--- /dev/null
@@ -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 (file)
index 0000000..1f916c6
--- /dev/null
@@ -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 (file)
index 0000000..142f2e8
--- /dev/null
@@ -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 (file)
index 0000000..f5d1a4e
--- /dev/null
@@ -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 (file)
index 0000000..27c5f41
--- /dev/null
@@ -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 (file)
index 0000000..a406184
--- /dev/null
@@ -0,0 +1,7 @@
+; test phi node
+int %main() {
+       br label %Test
+Test:
+       %X = phi int [7, %0]
+       ret int %X
+}