[PATCH] D154972: [amdgpu][lds] Fix missing markUsedByKernel calls

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 16:00:15 PDT 2023


JonChesterfield added a comment.

Reasonably interesting. Introducing a llvm.donothing with an explicit use of a global changes codegen. The checks in  noclobber-barrier fail for one of the atomic optimizer strategy options, looks like a regression to me.

@arsenm the segv test case in D154946 <https://reviews.llvm.org/D154946> is half-fixed by this. That test crashes on use of an accidentally default initialised value, and if that is fixed, crashes at this point. Splitting the two failures out because the change is mostly noise in test cases.



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:1178
-                         KernelToReplacement[OrderedKernels[i]].SGV);
-      }
-
----------------
This ^ crashes if the ith kernel doesn't have an associated struct, which happens if the ith kernel was only given an index for a dynamic LDS variable. This patch fixes that and the above todo by annotating the struct close to where it was created.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154972



More information about the llvm-commits mailing list