diff options
author | Chris Lattner <sabre@nondot.org> | 2002-06-08 17:33:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-06-08 17:33:16 +0000 |
commit | 23e07e73a8d05902278d506eba34b321e2302bb6 (patch) | |
tree | f307512a8ee5b3c2f2e350d1ea626edae496fc88 /test/Verifier | |
parent | db241dcf514ba4fb61c60d41b47e2dc601a6ac36 (diff) | |
download | external_llvm-23e07e73a8d05902278d506eba34b321e2302bb6.zip external_llvm-23e07e73a8d05902278d506eba34b321e2302bb6.tar.gz external_llvm-23e07e73a8d05902278d506eba34b321e2302bb6.tar.bz2 |
New testcases for verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/AmbiguousPhi.ll | 8 | ||||
-rw-r--r-- | test/Verifier/PhiGrouping.ll | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/Verifier/AmbiguousPhi.ll b/test/Verifier/AmbiguousPhi.ll new file mode 100644 index 0000000..7da71b0 --- /dev/null +++ b/test/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/test/Verifier/PhiGrouping.ll b/test/Verifier/PhiGrouping.ll new file mode 100644 index 0000000..71fbb1c --- /dev/null +++ b/test/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 +} |