forked from OSchip/llvm-project
[InstCombine] foldAggregateConstructionIntoAggregateReuse(): use InstCombiner::replaceInstUsesWith() instead of RAUW
We really shouldn't use RAUW in InstCombine because we should consistently update Worklist to avoid extra iterations.
This commit is contained in:
parent
e65f213178
commit
71ac9105cd
|
@ -975,7 +975,7 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
|
|||
PHI->addIncoming(SourceAggregates[Pred], Pred);
|
||||
|
||||
++NumAggregateReconstructionsSimplified;
|
||||
OrigIVI.replaceAllUsesWith(PHI);
|
||||
replaceInstUsesWith(OrigIVI, PHI);
|
||||
|
||||
// Just signal that the fold happened, we've already inserted instructions.
|
||||
return &OrigIVI;
|
||||
|
|
Loading…
Reference in New Issue