Checkin first unit testcases for the backend
authorChris Lattner <sabre@nondot.org>
Sun, 14 Apr 2002 06:23:00 +0000 (06:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 14 Apr 2002 06:23:00 +0000 (06:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2249 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll [new file with mode: 0644]
test/LLC/2002-04-14-UnexpectedUnsignedType.ll [new file with mode: 0644]
test/LLC/Makefile [new file with mode: 0644]

diff --git a/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll b/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
new file mode 100644 (file)
index 0000000..6e61736
--- /dev/null
@@ -0,0 +1,13 @@
+; This causes the backend to assert out with:
+; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
+;
+implementation
+
+declare void "bar"(sbyte* %G)
+
+void "foo"()
+begin
+       %cast225 = cast ulong 123456 to sbyte*          ; <sbyte*> [#uses=1]
+       call void %bar( sbyte* %cast225)
+       ret void
+end
diff --git a/test/LLC/2002-04-14-UnexpectedUnsignedType.ll b/test/LLC/2002-04-14-UnexpectedUnsignedType.ll
new file mode 100644 (file)
index 0000000..6e61736
--- /dev/null
@@ -0,0 +1,13 @@
+; This causes the backend to assert out with:
+; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
+;
+implementation
+
+declare void "bar"(sbyte* %G)
+
+void "foo"()
+begin
+       %cast225 = cast ulong 123456 to sbyte*          ; <sbyte*> [#uses=1]
+       call void %bar( sbyte* %cast225)
+       ret void
+end
diff --git a/test/LLC/Makefile b/test/LLC/Makefile
new file mode 100644 (file)
index 0000000..41cd6de
--- /dev/null
@@ -0,0 +1,15 @@
+#                    test/Regression/LLC/Makefile
+#
+# This directory contains regression tests for the LLVM sparc backend.  
+#
+LEVEL = ../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ts))
+
+Output/%.ts: Output/%.bc $(LLC) Output/.dir
+       @echo "======== Compiling $< =========="
+       $(LLC) -f $< -o $@ || \
+                 ( rm -f $@; $(FAILURE) $@ )