1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

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 e02cb4cda0
commit aac2dbf9dd

View File

@ -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]));
}
}