diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-14 05:42:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-14 05:42:52 +0000 |
commit | c9b0702a890c8afa3da413e42a3a7aa5bbd53e18 (patch) | |
tree | 36ccfbc3259c50d09d19f19152cc2bf633172850 /lib | |
parent | 30768ac3c2395d5b2047ec84e1b8f4330ba2658f (diff) |
Fix check. PHI nodes must be handled specially, of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index a9bcbd5f8f..1a66a9f965 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -507,14 +507,15 @@ void Verifier::visitInstruction(Instruction &I) { else if (Instruction *Op = dyn_cast<Instruction>(I.getOperand(i))) { BasicBlock *OpBlock = Op->getParent(); - // Invoke results are only usable in the normal destination, not in the - // exceptional destination. - if (InvokeInst *II = dyn_cast<InvokeInst>(Op)) - OpBlock = II->getNormalDest(); // Check that a definition dominates all of its uses. // if (!isa<PHINode>(I)) { + // Invoke results are only usable in the normal destination, not in the + // exceptional destination. + if (InvokeInst *II = dyn_cast<InvokeInst>(Op)) + OpBlock = II->getNormalDest(); + // Definition must dominate use unless use is unreachable! Assert2(DS->dominates(OpBlock, BB) || !DS->dominates(&BB->getParent()->getEntryBlock(), BB), |