[llvm] [AMDGPU][LTO] Introduce AMDGPUCloneModuleLDS (PR #89683)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 08:06:01 PDT 2024


================
@@ -0,0 +1,100 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt -passes=amdgpu-clone-module-lds %s -S | FileCheck %s
+
+target triple = "amdgcn-amd-amdhsa"
+
+%struct.RT = type { i8, [10 x [20 x i32]], i8 }
+%struct.GV = type { i32, double, %struct.RT }
+
+; CHECK: [[GV_CLONE_0:@.*]] = internal addrspace(3) global %struct.GV poison, align 8
+; CHECK: [[GV:@.*]] = internal addrspace(3) global %struct.GV zeroinitializer, align 8
+ at lds_gv = internal addrspace(3) global %struct.GV zeroinitializer, align 8
----------------
arsenm wrote:

```suggestion
@lds_gv = internal addrspace(3) global %struct.GV poison, align 8
```

Might as well use the one initializer we support now 

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


More information about the llvm-commits mailing list