forked from OSchip/llvm-project
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:
parent
8e4b029573
commit
403b95af47
|
@ -269,7 +269,8 @@ bool LoopUnroll::visitLoop(Loop *L) {
|
|||
if (isa<Instruction>(InVal))
|
||||
InVal = LastValueMap[InVal];
|
||||
(*SI)->removeIncomingValue(LatchBlock, false);
|
||||
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
|
||||
if (InVal)
|
||||
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue