[PATCH] D147348: [MergedLoadStoreMotion] Merge stores with conflicting value types
Jeffrey Byrnes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 09:22:29 PDT 2023
jrbyrnes marked an inline comment as done.
jrbyrnes added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp:266
+ IRBuilder<> Builder(S0);
+ auto Cast = Builder.CreateBitOrPointerCast(S0->getValueOperand(),
+ S1->getValueOperand()->getType());
----------------
arsenm wrote:
> This should not introduce addrspacecast. I’m assuming this is filtered by isBitOrNoopPointerCastable
If the valueOperand of the store are ptrs of conflicting addrspace, they are not sink candidates. isBitOrNoopPointerCastable will return false due to explicit addrspace check (return SrcPtrTy->getAddressSpace() == DestPtrTy->getAddressSpace()). (caught by sink_addrspace test)
Potentially relevant is that MLSM finds sink candidates based on matching pointers of stores (S0->getPointerOperand() == S1->getPointerOperand()). So, we won't be able to match on addressspace casted pointers (sink_addrspace3 test)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147348/new/
https://reviews.llvm.org/D147348
More information about the llvm-commits
mailing list