summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-24 19:48:06 +0000
committerChris Lattner <sabre@nondot.org>2003-06-24 19:48:06 +0000
commitf7544873def024bcba8045e008e64e3147dfbdea (patch)
treed2af03d2b8a14dffbebda7797ef5fc342be67395 /llvm
parent17b4e96e7e5cd4edbab28d0c00126cc8cafb3b99 (diff)
downloadbcm5719-llvm-f7544873def024bcba8045e008e64e3147dfbdea.tar.gz
bcm5719-llvm-f7544873def024bcba8045e008e64e3147dfbdea.zip
Fix bug: TailDup/2003-06-24-Simpleloop.ll
llvm-svn: 6881
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/Scalar/TailDuplication.cpp3
1 files changed, 2 insertions, 1 deletions
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<Instruction>(*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<PHINode>(In))
Users.push_back(In);
}
OpenPOWER on IntegriCloud