New testcase for the lowerswitch pass
authorChris Lattner <sabre@nondot.org>
Thu, 1 May 2003 21:27:24 +0000 (21:27 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 1 May 2003 21:27:24 +0000 (21:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5977 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll [new file with mode: 0644]
test/Transforms/LowerSwitch/Makefile [new file with mode: 0644]

diff --git a/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll b/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
new file mode 100644 (file)
index 0000000..1c8dfef
--- /dev/null
@@ -0,0 +1,19 @@
+; RUN: as < %s | opt -lowerswitch
+
+void %child(int %ct.1) {
+entry:          ; No predecessors!
+        switch uint 0, label %return [
+                 uint 2, label %UnifiedExitNode
+                 uint 3, label %UnifiedExitNode
+                 uint 0, label %return
+                 uint 1, label %UnifiedExitNode
+        ]
+
+return:         ; preds = %entry, %entry
+        %result.0 = phi %struct.quad_struct* [ null, %entry ], [ null, %entry ]         ; <%struct.quad_struct*> [#uses=0]
+        br label %UnifiedExitNode
+
+UnifiedExitNode:                ; preds = %entry, %return, %entry, %entry
+        ret void
+}
+
diff --git a/test/Transforms/LowerSwitch/Makefile b/test/Transforms/LowerSwitch/Makefile
new file mode 100644 (file)
index 0000000..91acd4d
--- /dev/null
@@ -0,0 +1,10 @@
+
+LEVEL = ../../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
+
+Output/%.ll.out: %.ll Output/.dir $(LOPT)
+       -$(TESTRUNR) $<