forked from OSchip/llvm-project
don't invalidate PN, rewrite of this code is in progress anyway.
llvm-svn: 86639
This commit is contained in:
parent
612e38026a
commit
be11db6894
|
@ -223,10 +223,11 @@ static void RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
|
|||
U = PNV;
|
||||
|
||||
// See if we can simplify it.
|
||||
if (Value *V = SimplifyInstruction(User, TD)) {
|
||||
User->replaceAllUsesWith(V);
|
||||
User->eraseFromParent();
|
||||
}
|
||||
if (User != PN)
|
||||
if (Value *V = SimplifyInstruction(User, TD)) {
|
||||
User->replaceAllUsesWith(V);
|
||||
User->eraseFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
PN->replaceAllUsesWith(PNV);
|
||||
|
|
Loading…
Reference in New Issue