[llvm] [InferAddressSpaces] Infer pointer stored and then loaded from global variable (PR #159755)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 24 04:21:56 PST 2025
================
@@ -373,6 +399,19 @@ getPointerOperands(const Value &V, const DataLayout &DL,
auto *P2I = cast<Operator>(Op.getOperand(0));
return {P2I->getOperand(0)};
}
+ case Instruction::Load: {
+ assert(V.getType()->isPtrOrPtrVectorTy());
----------------
wenju-he wrote:
> This function is supposed to be simply parsing the pointer operand, it shouldn't have any of this user analysis?
done, reverted this change. Refactored stored pointer retrieving into a new function getStoredPointerOperands.
https://github.com/llvm/llvm-project/pull/159755
More information about the llvm-commits
mailing list