mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 18:12:49 +00:00
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b6b40ebc83
commit
ac58516cdc
@ -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…
x
Reference in New Issue
Block a user