If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-11-05 19:32:30 +00:00
parent 9ca08f3d8e
commit 5d01aa484f
2 changed files with 293 additions and 3 deletions
-3
View File
@@ -370,9 +370,6 @@ bool LoopUnroll::unrollLoop(Loop *L, unsigned Count, unsigned Threshold) {
if (isa<PHINode>(UseInst) && !L->contains(UseInst->getParent())) {
PHINode *phi = cast<PHINode>(UseInst);
Value *Incoming = phi->getIncomingValueForBlock(*BB);
if (isa<Instruction>(Incoming))
Incoming = LastValueMap[Incoming];
phi->addIncoming(Incoming, New);
}
}