[PATCH] D146762: [Verifier] Ban GEP, load, store of addrspace(8) on AMDGPU

Krzysztof Drewniak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 14:40:41 PDT 2023


krzysz00 created this revision.
Herald added subscribers: kosarev, kerbowa, hiraditya, arichardson, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
krzysz00 requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

AMDGPU buffer resources (address space 8) have a complex
representation (they're 80 bits of metadata followed by 48 bits of
address) and a complex set of addressing modes (such as structured
buffer addressing, which separates out an "index" and "offset" and
allow for things like in-hardware swizzling). While these resources
are represented as pointers to enable alias analysis and other
pointer-based reasoning, they must not be manipulated using standard
LLVM instructions.

This commit adds the cases to the LLVM verifier needed to prohibit
such usage.

Depends on D146761 <https://reviews.llvm.org/D146761>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146762

Files:
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/unsupported-load.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/unsupported-ptr-add.ll
  llvm/test/Verifier/AMDGPU/buffer-rsrc-pointers.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146762.507889.patch
Type: text/x-patch
Size: 4220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/153f2bb5/attachment.bin>


More information about the llvm-commits mailing list