From 23e07e73a8d05902278d506eba34b321e2302bb6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 8 Jun 2002 17:33:16 +0000 Subject: [PATCH] New testcases for verifier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2763 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Verifier/AmbiguousPhi.ll | 8 ++++++++ test/Verifier/PhiGrouping.ll | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/Verifier/AmbiguousPhi.ll create mode 100644 test/Verifier/PhiGrouping.ll diff --git a/test/Verifier/AmbiguousPhi.ll b/test/Verifier/AmbiguousPhi.ll new file mode 100644 index 00000000000..7da71b05162 --- /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 00000000000..71fbb1c4e5d --- /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 +}