[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:
Roman Lebedev 2020-08-29 15:04:07 +03:00
parent e65f213178
commit 71ac9105cd
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 1 additions and 1 deletions

View File

@ -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;