From f7544873def024bcba8045e008e64e3147dfbdea Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 24 Jun 2003 19:48:06 +0000 Subject: Fix bug: TailDup/2003-06-24-Simpleloop.ll llvm-svn: 6881 --- llvm/lib/Transforms/Scalar/TailDuplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp index e736f970af5..04736f07e14 100644 --- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp +++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp @@ -203,7 +203,8 @@ void TailDup::InsertPHINodesIfNecessary(Instruction *OrigInst, Value *NewInst, for (Value::use_iterator I = OrigInst->use_begin(), E = OrigInst->use_end(); I != E; ++I) { Instruction *In = cast(*I); - if (In->getParent() != OrigBlock) // Don't modify uses in the orig block! + if (In->getParent() != OrigBlock || // Don't modify uses in the orig block! + isa(In)) Users.push_back(In); } -- cgit v1.2.3