From 644af802c937cbbfd2fb54e8d28300d875f30d4a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Feb 2004 17:28:25 +0000 Subject: [PATCH] Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll llvm-svn: 11913 --- lib/VMCore/Verifier.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }