[PATCH] D102096: [DAGCombiner] Fix DAG combine store elimination, different address space.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 10:56:03 PDT 2021


jrtc27 added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17919
         ST->isUnindexed() && ST->isSimple() &&
+        Ld->getAddressSpace() == ST->getAddressSpace() &&
         // There can't be any side effects between the load and store, such as
----------------
hgreving wrote:
> jrtc27 wrote:
> > Should this be weakened using `isNoopAddrSpaceCast` both(?) ways round?
> I am actually not sure about the _exact_ semantics of isNoopAddrSpaceCast(). Does it imply that if true, it is a complete nop w.r.t. the memory model?
memcpy/memmove/memset libcall lowering at least relies on being able to lower calls with any pointers that can be no-op cast to address space 0 (see checkAddrSpaceIsValidForLibcall). CodeGenPrepare also peeks through them though haven't looked exactly how.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102096/new/

https://reviews.llvm.org/D102096



More information about the llvm-commits mailing list