[PATCH] D148184: [AMDGPU] Use resource base for buffer instruction MachineMemOperands

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 06:57:26 PDT 2023


arsenm added a comment.

I thought the point of these offsets were to provide a quick way to avoid going through potentially expensive AA queries in the common case where you're comparing common offsets from a base address. You wouldn't expect to see codegen differences, but it would be slower



================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:1006
+    if (auto *RsrcPtrTy = dyn_cast<PointerType>(RsrcArg->getType())) {
+      if (RsrcPtrTy->getAddressSpace() == AMDGPUAS::BUFFER_RESOURCE)
+        // We conservatively set the memory operand of a buffer intrinsic to the
----------------
Perhaps should be wrapped by a isBufferResource helper. I'm worried about introducing more buffer address spaces in the future


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148184



More information about the llvm-commits mailing list