[llvm] [AMDGPU] Allocate i1 argument to SGPRs (PR #72461)

Jun Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 18:57:18 PST 2023


jwanggit86 wrote:

Some explanations. First the calling convention is changed such that i1 arg is allocated to SGPR_32. Then 2 problems have to be fixed to prevent compile errors: (1) on the callee side, handle SGPR_32 to SGPR_64 copies by copying the SGPR_32 to the lower 32b of the SGPR_64, and set the higher 32b to 0 (2) on the caller side, handle SGPR_64 to SGPR_32 copies by ignoring the higher 32b of the SGPR_64.

I'm not sure if there are any potential problems with all the code changes and can't help thinking there might be a better solution. So, I'd like to have some comments before going any further. Thanks!

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


More information about the llvm-commits mailing list