[llvm] InferAddressSpaces: Improve handling of instructions with multiple pointer uses (PR #101922)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 11:20:27 PDT 2024
================
@@ -1226,11 +1245,10 @@ bool InferAddressSpacesImpl::rewriteWithNewAddressSpaces(
I = skipToNextUser(I, E);
if (isSimplePointerUseValidToReplace(
- *TTI, U, V->getType()->getPointerAddressSpace())) {
+ *TTI, CurUser, V->getType()->getPointerAddressSpace(), V, NewV)) {
// If V is used as the pointer operand of a compatible memory operation,
----------------
Artem-B wrote:
The comment may also be out of date/or out of place/redundant now, as all the magic happens in `isSimplePointerUseValidToReplace`.
https://github.com/llvm/llvm-project/pull/101922
More information about the llvm-commits
mailing list