[llvm] [AMDGPU] Make `getAssumedAddrSpace` return AS1 for pointer kernel arguments (PR #137488)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon May 5 14:28:59 PDT 2025


================
@@ -166,48 +146,28 @@ define amdgpu_kernel void @llvm_amdgcn_is_shared(ptr %ptr) #0 {
 define amdgpu_kernel void @llvm_amdgcn_is_private(ptr %ptr) #0 {
 ; GFX8V4-LABEL: llvm_amdgcn_is_private:
 ; GFX8V4:       ; %bb.0:
-; GFX8V4-NEXT:    s_load_dword s0, s[6:7], 0x44
-; GFX8V4-NEXT:    s_load_dword s1, s[8:9], 0x4
-; GFX8V4-NEXT:    s_waitcnt lgkmcnt(0)
-; GFX8V4-NEXT:    s_cmp_eq_u32 s1, s0
-; GFX8V4-NEXT:    s_cselect_b64 s[0:1], -1, 0
-; GFX8V4-NEXT:    v_cndmask_b32_e64 v0, 0, 1, s[0:1]
+; GFX8V4-NEXT:    v_mov_b32_e32 v0, 0
----------------
shiltian wrote:

TBH I think these updated tests in this file are misleading in the first place, because how can a pointer kernel argument be in private or shared memory? I'd like to make it a device function but this file is about kernel argument. We might want to remove them.

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


More information about the llvm-commits mailing list