aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-25 23:01:51 +0000
committerChris Lattner <sabre@nondot.org>2002-10-25 23:01:51 +0000
commit1405ec0ce19e95555337aaf1f9d66a56394aed6e (patch)
treee34607934ccbe3685b05c9916fb51cc2d11f1905
parent3d7771a387d9476cfb25451ab95b72ce7b3e2532 (diff)
downloadexternal_llvm-1405ec0ce19e95555337aaf1f9d66a56394aed6e.zip
external_llvm-1405ec0ce19e95555337aaf1f9d66a56394aed6e.tar.gz
external_llvm-1405ec0ce19e95555337aaf1f9d66a56394aed6e.tar.bz2
Checkin simple testcases for LLVM-JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4288 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Jello/Makefile23
-rw-r--r--test/Jello/test0.ll4
-rw-r--r--test/Jello/test1.ll4
-rw-r--r--test/Jello/test2.ll5
-rw-r--r--test/Jello/test3.ll6
-rw-r--r--test/Jello/test4.ll7
6 files changed, 49 insertions, 0 deletions
diff --git a/test/Jello/Makefile b/test/Jello/Makefile
new file mode 100644
index 0000000..a905384
--- /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 0000000..1f916c6
--- /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 0000000..142f2e8
--- /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 0000000..f5d1a4e
--- /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 0000000..27c5f41
--- /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 0000000..a406184
--- /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
+}