aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0000000000..a9053845d9
--- /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 0000000000..1f916c6542
--- /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 0000000000..142f2e8123
--- /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 0000000000..f5d1a4ee36
--- /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 0000000000..27c5f4179d
--- /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 0000000000..a406184d80
--- /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
+}