aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-08-29 15:04:07 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-08-29 15:10:14 +0300
commit71ac9105cd392a257d15515579c70f06c970c5cb (patch)
tree16d7b2fbcda6e9337c2380adc44ba10af73c109a /llvm/lib
parente65f2131782bc39ec66fc9c74991ff6c2ff1d93b (diff)
downloadllvm-71ac9105cd392a257d15515579c70f06c970c5cb.zip
llvm-71ac9105cd392a257d15515579c70f06c970c5cb.tar.gz
llvm-71ac9105cd392a257d15515579c70f06c970c5cb.tar.bz2
[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.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index 5cd1822..14de00f 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -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;