Skip to content

Commit 0ade4ba

Browse files
author
Salinas, David
authored
[AMDGPU] Fix 160181. Be less optimistic when allocating module scope … (llvm#4642)
2 parents 564c6ad + 74bb07b commit 0ade4ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,8 @@ class AMDGPULowerModuleLDS {
649649
ModuleScopeVariables.insert(GV);
650650
} else if (K.second.size() == 1) {
651651
KernelAccessVariables.insert(GV);
652-
} else if (K.second == HybridModuleRootKernels) {
652+
} else if (K.second == HybridModuleRootKernels &&
653+
set_is_subset(K.second, HybridModuleRootKernels)) {
653654
ModuleScopeVariables.insert(GV);
654655
} else {
655656
TableLookupVariables.insert(GV);

llvm/test/CodeGen/AMDGPU/lower-module-lds-precise-allocate-to-module-struct.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,3 @@ define amdgpu_kernel void @kern_block_direct_allocation() {
138138
; CHECK: attributes #[[ATTR1]] = { "amdgpu-lds-size"="16" }
139139
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(none) }
140140
; CHECK: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
141-
;.

0 commit comments

Comments
 (0)