mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-30 17:21:10 +00:00
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html llvm-svn: 36182
This commit is contained in:
parent
369bec184b
commit
abdff3fecd
@ -304,6 +304,12 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
(*SI)->removeIncomingValue(LatchBlock, false);
|
||||
if (InVal)
|
||||
(*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock]));
|
||||
if ((*SI)->getNumIncomingValues() == 0) {
|
||||
// Remove this phi node.
|
||||
// If anyone is using this PHI, make them use a dummy value instead...
|
||||
(*SI)->replaceAllUsesWith(UndefValue::get((*SI)->getType()));
|
||||
(*SI)->eraseFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user