[llvm] [AMDGPU] Use table strategy for LowerModuleLDSPass at O0 (PR #160181)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 22:21:46 PDT 2025


================
@@ -0,0 +1,92 @@
+; RUN: not llc -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -filetype=null < %s 2>&1 | FileCheck --check-prefix=CHECK %s
+; CHECK-NOT: error: <unknown>:0:0: local memory (98304) exceeds limit (65536) in function 'k2'
+
+ at gA = internal addrspace(3) global [32768 x i8] undef, align 4
+ at gB = internal addrspace(3) global [32768 x i8] undef, align 4
+ at gC = internal addrspace(3) global [32768 x i8] undef, align 4
----------------
arsenm wrote:

```suggestion
@gA = internal addrspace(3) global [32768 x i8] poison, align 4
@gB = internal addrspace(3) global [32768 x i8] poison, align 4
@gC = internal addrspace(3) global [32768 x i8] poison, align 4
```

https://github.com/llvm/llvm-project/pull/160181


More information about the llvm-commits mailing list