forked from OSchip/llvm-project
[InstCombine] visitPHINode(): use InstCombiner::replaceInstUsesWith() instead of RAUW
As noted in post-commit review, we really shouldn't use RAUW in InstCombine because we should consistently update Worklist to avoid extra iterations.
This commit is contained in:
parent
3e69871ab5
commit
4f4eecf0ec
|
@ -1439,7 +1439,7 @@ Instruction *InstCombinerImpl::visitPHINode(PHINode &PN) {
|
|||
continue;
|
||||
// Just use that PHI instead then.
|
||||
++NumPHICSEs;
|
||||
PN.replaceAllUsesWith(&Src);
|
||||
replaceInstUsesWith(PN, &Src);
|
||||
return &PN;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue