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

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 15:39:33 PDT 2021


rampitec added inline comments.


================
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
----------------
hsmhsm wrote:
> `@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`.
There was a dangling use of constantexpr bitcast from llvm.used, so use list was not empty. Added a call to C->removeDeadConstantUsers() while destroying llvm.used. Negative check is also added.


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

https://reviews.llvm.org/D102954



More information about the llvm-commits mailing list