[llvm] [InstCombine]PtrReplacer: Correctly handle select with unavailable operands (PR #148829)
Anshil Gandhi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 10:07:40 PDT 2025
================
@@ -309,21 +318,26 @@ bool PointerReplacer::collectUsers() {
// incoming values.
Worklist.emplace_back(PHI);
for (unsigned Idx = 0; Idx < PHI->getNumIncomingValues(); ++Idx) {
- auto *IncomingValue = cast<Instruction>(PHI->getIncomingValue(Idx));
- if (UsersToReplace.contains(IncomingValue))
- continue;
- if (!ValuesToRevisit.insert(IncomingValue))
+ if (!TryPushInstOperand(cast<Instruction>(PHI->getIncomingValue(Idx))))
----------------
gandhi56 wrote:
This is a NFC and is already being tested in AMDGPU/ptr-replace-alloca.ll
https://github.com/llvm/llvm-project/pull/148829
More information about the llvm-commits
mailing list