[llvm] [AMDGPU][LowerModuleLDS] Handle non-dynlds zero sized type (PR #84742)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 04:30:30 PDT 2024
================
@@ -1398,8 +1398,8 @@ class AMDGPULowerModuleLDS {
LDSVarsToTransform.begin(), LDSVarsToTransform.end()));
for (GlobalVariable *GV : Sorted) {
- OptimizedStructLayoutField F(GV,
- DL.getTypeAllocSize(GV->getValueType()),
+ unsigned Size = DL.getTypeAllocSize(GV->getValueType());
+ OptimizedStructLayoutField F(GV, Size ? Size : 1,
----------------
arsenm wrote:
Yes, it's an edge case but what does it actually mean?
https://github.com/llvm/llvm-project/pull/84742
More information about the llvm-commits
mailing list