[llvm] [AMDGPU] Propagate amdgpu-agpr-alloc to ASan runtime calls in SwLowerLDS (PR #195915)

Pablo Reble via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 19:02:40 PDT 2026


reble wrote:

> This doesn't sound right. You're introducing a call to an external function, which needs to have compatible attributes to start. As far as the attributor is concerned, it shouldn't have introduced the attributes if there was a possibility of introducing these sanitizer calls

Thanks @arsenm for your feedback.

Adding @skc7 and summarizing offline discussion: sw-lower-lds pass runs late in the pipeline after the attributor pass. sw-lower-lds pass already handles some attributes, e.g. removing "amdgpu-no-heap-ptr" from the kernel. 

Specific problem for not populating "amdgpu-agpr-alloc=0" results in runtime function allocating APGRs which can push total VGPR register allocation above thresholds, resulting in invalid kernels. 

https://github.com/llvm/llvm-project/pull/195915


More information about the llvm-commits mailing list