mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Fix a crash related to updating Phi nodes in the original header block. This was
causing a crash in 175.vpr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -269,7 +269,8 @@ bool LoopUnroll::visitLoop(Loop *L) {
|
|||||||
if (isa<Instruction>(InVal))
|
if (isa<Instruction>(InVal))
|
||||||
InVal = LastValueMap[InVal];
|
InVal = LastValueMap[InVal];
|
||||||
(*SI)->removeIncomingValue(LatchBlock, false);
|
(*SI)->removeIncomingValue(LatchBlock, false);
|
||||||
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
|
if (InVal)
|
||||||
|
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user