[llvm] [InferAddressSpaces] Handle unconverted ptrmask (PR #140802)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 02:32:15 PDT 2025
================
@@ -1338,7 +1338,20 @@ bool InferAddressSpacesImpl::rewriteWithNewAddressSpaces(
unsigned OperandNo = PoisonUse->getOperandNo();
assert(isa<PoisonValue>(NewV->getOperand(OperandNo)));
- NewV->setOperand(OperandNo, ValueWithNewAddrSpace.lookup(PoisonUse->get()));
+ WeakTrackingVH NewOp = ValueWithNewAddrSpace.lookup(PoisonUse->get());
+ if (NewOp) {
+ NewV->setOperand(OperandNo, NewOp);
+ } else {
+ // Something went wrong while converting the instruction defining the new
+ // operand value. -> Replace the poison value with the previous operand
+ // value combined with an addrspace case.
----------------
arsenm wrote:
Yes
https://github.com/llvm/llvm-project/pull/140802
More information about the llvm-commits
mailing list