[llvm] [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (PR #114278)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 23:41:15 PST 2024
================
@@ -1895,17 +1916,21 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN) {
for (unsigned i = 0; i != NumPHIValues; ++i)
NewPN->addIncoming(NewPhiValues[i], PN->getIncomingBlock(i));
- for (User *U : make_early_inc_range(PN->users())) {
- Instruction *User = cast<Instruction>(U);
- if (User == &I)
- continue;
- replaceInstUsesWith(*User, NewPN);
- eraseInstFromFunction(*User);
+ if (AllUsesIdentical) {
----------------
dtcxzyw wrote:
Can you explain this change?
https://github.com/llvm/llvm-project/pull/114278
More information about the llvm-commits
mailing list