summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-06-08 17:33:16 +0000
committerChris Lattner <sabre@nondot.org>2002-06-08 17:33:16 +0000
commit18b412df5e84ade5e0959b92b78b71175864dc8c (patch)
tree87947f99ca8d35c6a64139960d0b383a3bd43fed /llvm
parent2152e03bfd9c0cceda7c51adcf56dad6b3d75fb1 (diff)
downloadbcm5719-llvm-18b412df5e84ade5e0959b92b78b71175864dc8c.tar.gz
bcm5719-llvm-18b412df5e84ade5e0959b92b78b71175864dc8c.zip
New testcases for verifier
llvm-svn: 2763
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Regression/Verifier/AmbiguousPhi.ll8
-rw-r--r--llvm/test/Regression/Verifier/PhiGrouping.ll15
2 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Regression/Verifier/AmbiguousPhi.ll b/llvm/test/Regression/Verifier/AmbiguousPhi.ll
new file mode 100644
index 00000000000..7da71b05162
--- /dev/null
+++ b/llvm/test/Regression/Verifier/AmbiguousPhi.ll
@@ -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/llvm/test/Regression/Verifier/PhiGrouping.ll b/llvm/test/Regression/Verifier/PhiGrouping.ll
new file mode 100644
index 00000000000..71fbb1c4e5d
--- /dev/null
+++ b/llvm/test/Regression/Verifier/PhiGrouping.ll
@@ -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
+}
OpenPOWER on IntegriCloud