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
It feels wrong to me to have target-dependent checks in the IR verifier, but I don't know if it is actually prohibited.
TT crept into the verifier in D65686 as a way to implement object-file-format-dependent checks.