Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-27 17:28:25 +00:00
parent 1aed1c7b3b
commit 08092533b1

View File

@ -474,7 +474,8 @@ void Verifier::visitInstruction(Instruction &I) {
if (!isa<PHINode>(I)) { // Check that non-phi nodes are not self referential
for (Value::use_iterator UI = I.use_begin(), UE = I.use_end();
UI != UE; ++UI)
Assert1(*UI != (User*)&I,
Assert1(*UI != (User*)&I ||
!DS->dominates(&BB->getParent()->getEntryBlock(), BB),
"Only PHI nodes may reference their own value!", &I);
}