llvm-project
6b9da28b - [AMDGPU][LowerBufferFatPointers] Handle addrspacecast null to p7 (#140775)

Commit
274 days ago
[AMDGPU][LowerBufferFatPointers] Handle addrspacecast null to p7 (#140775) Some application code operating on generic pointers (that then gete initialized to buffer fat pointers) may perform tests against nullptr. After address space inference, this results in comparisons against `addrspacecast (ptr null to ptr addrspace(7))`, which were crashing. However, while general casts to ptr addrspace(7) from generic pointers aren't supposted, it is possible to cast null pointers to the all-zerose bufer resource and 0 offset, which this patch adds. It also adds a TODO for casting _out_ of buffer resources, which isn't implemented here but could be.
Author
Parents
Loading