mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 19:57:44 +00:00
Fix bug: test/Regression/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
... which tickled the lowerinvoke pass because it used the BCE routines. llvm-svn: 12012
This commit is contained in:
parent
ed18f6afc2
commit
9736130083
@ -119,8 +119,11 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
|
||||
//
|
||||
for (BasicBlock::iterator I = DestBB->begin();
|
||||
PHINode *PN = dyn_cast<PHINode>(I); ++I) {
|
||||
// We no longer enter through TIBB, now we come in through NewBB.
|
||||
PN->replaceUsesOfWith(TIBB, NewBB);
|
||||
// We no longer enter through TIBB, now we come in through NewBB. Revector
|
||||
// exactly one entry in the PHI node that used to come from TIBB to come
|
||||
// from NewBB.
|
||||
Value *InVal = PN->removeIncomingValue(TIBB, false);
|
||||
PN->addIncoming(InVal, NewBB);
|
||||
}
|
||||
|
||||
// If we don't have a pass object, we can't update anything...
|
||||
|
Loading…
x
Reference in New Issue
Block a user