[PATCH] D102954: [AMDGPU] Lower kernel LDS into a sorted structure

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 22 09:14:16 PDT 2021


hsmhsm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll:44
 define amdgpu_kernel void @timestwo() {
   %ld = load i32, i32* inttoptr (i64 add (i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* bitcast (float addrspace(3)* @both to i32 addrspace(3)*) to i32*) to i64), i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* bitcast (float addrspace(3)* @kern to i32 addrspace(3)*) to i32*) to i64)) to i32*), align 4
   %mul = mul i32 %ld, 2
----------------
`@kern` is not lowered here, and same below at line 46.


================
Comment at: llvm/test/CodeGen/AMDGPU/lower-module-lds-inactive.ll:10
 ; var1, var2 would be transformed were they used from a non-kernel function
 ; CHECK: @var1 = addrspace(3) global i32 undef
 ; CHECK: @var2 = addrspace(3) global float undef
----------------
`@var1` is kernel lowered. so it should have 0 use, and got erased. Why it is still there? and we should have CHECK-NOT test for  `@var1`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102954/new/

https://reviews.llvm.org/D102954



More information about the llvm-commits mailing list