[llvm] [AMDGPU] Allow WorkgroupID intrinsics in amdgpu_gfx functions (PR #89773)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 07:47:36 PDT 2024


jayfoad wrote:

> > Maybe we should allow them in _all_ calling conventions?
> 
> If the registers are always available, why not?

Hardware only sets them up for compute entrypoints. So you can use them in anything called from a compute entrypoint. So amdgpu_cs or amdgpu_kernel is definitely OK, amdgpu_ps etc definitely not OK, and all other calling conventions (including amdgpu_gfx) are only OK if they were called from a compute entrypoint.

The question is, how much of this is worth trying to detect in the compiler?

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


More information about the llvm-commits mailing list