[PATCH] D100717: [InstCombine] Transform memcpy to ptr load/stores if TBAA says so

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 10:30:28 PDT 2021


arichardson added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:177
+  Type* DataType = nullptr;
+  if (CopyMD && CopyMD->isTBAAPointerAccess() && SrcAddrSp == DstAddrSp &&
+      Size * 8 == DL.getPointerSizeInBits(SrcAddrSp)) {
----------------
lebedev.ri wrote:
> arichardson wrote:
> > I wonder if it would make sense to default to pointer load+store for non-integral address space?
> > For CHERI we would definitely want this to be the default, but we can carry that patch downstream.
> I'm not really sure why that would be the right default,
> but regardless let's not conflate that here.
Please ignore this suggestion. For some reason I read this as `SrcAddrSp` being the address space of the pointee, which we of course don't have here. The address space of the pointer is irrelevant in this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100717



More information about the llvm-commits mailing list