Fix a crash related to updating Phi nodes in the original header block. This was

causing a crash in 175.vpr

llvm-svn: 29887
This commit is contained in:
Owen Anderson 2006-08-25 22:13:55 +00:00
parent 8e4b029573
commit 403b95af47
1 changed files with 2 additions and 1 deletions

View File

@ -269,6 +269,7 @@ bool LoopUnroll::visitLoop(Loop *L) {
if (isa<Instruction>(InVal))
InVal = LastValueMap[InVal];
(*SI)->removeIncomingValue(LatchBlock, false);
if (InVal)
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
}
}