diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 4fe4adbadbc..dde804d2410 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -474,7 +474,8 @@ void Verifier::visitInstruction(Instruction &I) { if (!isa(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); }