New testcases for verifier
authorChris Lattner <sabre@nondot.org>
Sat, 8 Jun 2002 17:33:16 +0000 (17:33 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 8 Jun 2002 17:33:16 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2763 91177308-0d34-0410-b5e6-96231b3b80d8

test/Verifier/AmbiguousPhi.ll [new file with mode: 0644]
test/Verifier/PhiGrouping.ll [new file with mode: 0644]

diff --git a/test/Verifier/AmbiguousPhi.ll b/test/Verifier/AmbiguousPhi.ll
new file mode 100644 (file)
index 0000000..7da71b0
--- /dev/null
@@ -0,0 +1,8 @@
+
+
+int "test"(int %i, int %j, bool %c) {
+       br bool %c, label %A, label %A
+A:
+       %a = phi int [%i, %0], [%j, %0]  ; Error, different values from same block!
+       ret int %a
+}
diff --git a/test/Verifier/PhiGrouping.ll b/test/Verifier/PhiGrouping.ll
new file mode 100644 (file)
index 0000000..71fbb1c
--- /dev/null
@@ -0,0 +1,15 @@
+
+
+int "test"(int %i, int %j, bool %c) {
+       br bool %c, label %A, label %B
+A:
+       br label %C
+B:
+       br label %C
+
+C:
+       %a = phi int [%i, %A], [%j, %B]
+       %x = add int %a, 0                 ; Error, PHI's should be grouped!
+       %b = phi int [%i, %A], [%j, %B]
+       ret int %x
+}