[llvm] 1f52060 - AMDGPU: Use poison instead of undef in module lds pass

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 2 08:36:17 PDT 2023


Author: Matt Arsenault
Date: 2023-09-02T11:33:26-04:00
New Revision: 1f52060000f1fead314f7173f4c62bc58b9ca7c3

URL: https://github.com/llvm/llvm-project/commit/1f52060000f1fead314f7173f4c62bc58b9ca7c3
DIFF: https://github.com/llvm/llvm-project/commit/1f52060000f1fead314f7173f4c62bc58b9ca7c3.diff

LOG: AMDGPU: Use poison instead of undef in module lds pass

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
    llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
    llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
    llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll
    llvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll
    llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds-indirect-extern-uses-max-reachable-alignment.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds-used-list.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds-via-table.ll
    llvm/test/CodeGen/AMDGPU/lower-module-lds.ll
    llvm/test/CodeGen/AMDGPU/update-lds-alignment.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index e3a645977f9268..6d408d2281582a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -1367,9 +1367,9 @@ class AMDGPULowerModuleLDS : public ModulePass {
 
           Type *ATy = ArrayType::get(Type::getInt8Ty(Ctx), Padding);
           LocalVars.push_back(new GlobalVariable(
-              M, ATy, false, GlobalValue::InternalLinkage, UndefValue::get(ATy),
-              "", nullptr, GlobalValue::NotThreadLocal, AMDGPUAS::LOCAL_ADDRESS,
-              false));
+              M, ATy, false, GlobalValue::InternalLinkage,
+              PoisonValue::get(ATy), "", nullptr, GlobalValue::NotThreadLocal,
+              AMDGPUAS::LOCAL_ADDRESS, false));
           IsPaddingField.push_back(true);
           CurrentOffset += Padding;
         }
@@ -1391,7 +1391,7 @@ class AMDGPULowerModuleLDS : public ModulePass {
     Align StructAlign = AMDGPU::getAlign(DL, LocalVars[0]);
 
     GlobalVariable *SGV = new GlobalVariable(
-        M, LDSTy, false, GlobalValue::InternalLinkage, UndefValue::get(LDSTy),
+        M, LDSTy, false, GlobalValue::InternalLinkage, PoisonValue::get(LDSTy),
         VarName, nullptr, GlobalValue::NotThreadLocal, AMDGPUAS::LOCAL_ADDRESS,
         false);
     SGV->setAlignment(StructAlign);

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll b/llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
index 9a0f10042799c5..8c3b1bc3e6eadd 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
@@ -1,11 +1,11 @@
 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 ; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 
- at lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 1
- at lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 2
- at lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] undef, align 4
- at lds.size.8.align.8 = internal unnamed_addr addrspace(3) global [8 x i8] undef, align 8
- at lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] undef, align 16
+ at lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 1
+ at lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] poison, align 2
+ at lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] poison, align 4
+ at lds.size.8.align.8 = internal unnamed_addr addrspace(3) global [8 x i8] poison, align 8
+ at lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] poison, align 16
 
 ; CHECK: %llvm.amdgcn.module.lds.t = type { [8 x i8], [1 x i8] }
 ; CHECK: %llvm.amdgcn.kernel.k0.lds.t = type { [16 x i8], [4 x i8], [2 x i8], [1 x i8] }
@@ -14,12 +14,12 @@
 ; CHECK: %llvm.amdgcn.kernel.k3.lds.t = type { [4 x i8] }
 
 ;.
-; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 8, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 8, !absolute_symbol !0
 ; CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr addrspacecast (ptr addrspace(3) @llvm.amdgcn.module.lds to ptr)], section "llvm.metadata"
-; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t undef, align 16, !absolute_symbol !0
-; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 16, !absolute_symbol !0
-; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t undef, align 2, !absolute_symbol !0
-; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t undef, align 4, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t poison, align 16, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 16, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t poison, align 2, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t poison, align 4, !absolute_symbol !0
 ;.
 define amdgpu_kernel void @k0() #0 {
 ; CHECK-LABEL: @k0() #0

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
index 5f4c62f3b233b3..4fef9624d8ad6a 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
@@ -2,7 +2,7 @@
 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 ; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 
- at lds.1 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 1
+ at lds.1 = internal unnamed_addr addrspace(3) global [2 x i8] poison, align 1
 
 ; CHECK: %llvm.amdgcn.kernel.k0.lds.t = type { [2 x i8] }
 ; CHECK: %llvm.amdgcn.kernel.k1.lds.t = type { [2 x i8] }
@@ -14,13 +14,13 @@
 
 ; Use constant from 
diff erent kernels
 ;.
-; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t undef, align 2
-; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 2
-; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t undef, align 4
-; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t undef, align 2
-; CHECK: @llvm.amdgcn.kernel.k5.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k5.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k6.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k6.lds.t undef, align 16
+; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t poison, align 2
+; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 2
+; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t poison, align 4
+; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t poison, align 2
+; CHECK: @llvm.amdgcn.kernel.k5.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k5.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k6.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k6.lds.t poison, align 16
 ;.
 define amdgpu_kernel void @k0(i64 %x) {
 ; CHECK-LABEL: @k0(
@@ -46,7 +46,7 @@ define amdgpu_kernel void @k1(i64 %x) {
   ret void
 }
 
- at lds.2 = internal unnamed_addr addrspace(3) global i32 undef, align 4
+ at lds.2 = internal unnamed_addr addrspace(3) global i32 poison, align 4
 
 ; Use constant twice from the same kernel
 define amdgpu_kernel void @k2(i64 %x) {
@@ -60,7 +60,7 @@ define amdgpu_kernel void @k2(i64 %x) {
   ret void
 }
 
- at lds.3 = internal unnamed_addr addrspace(3) global [32 x i8] undef, align 1
+ at lds.3 = internal unnamed_addr addrspace(3) global [32 x i8] poison, align 1
 
 ; Use constant twice from the same kernel but a 
diff erent other constant.
 define amdgpu_kernel void @k3(i64 %x) {
@@ -93,20 +93,20 @@ define amdgpu_kernel void @k4(i64 %x) {
   ret void
 }
 
- at lds.4 = internal unnamed_addr addrspace(3) global [505 x i32] undef, align 4
+ at lds.4 = internal unnamed_addr addrspace(3) global [505 x i32] poison, align 4
 
 ; Multiple constexpr use in a same instruction.
 define amdgpu_kernel void @k5() {
 ; CHECK-LABEL: @k5(
 ; CHECK-NEXT:  %1 = addrspacecast ptr addrspace(3) @llvm.amdgcn.kernel.k5.lds to ptr
 ; CHECK-NEXT:  %2 = addrspacecast ptr addrspace(3) @llvm.amdgcn.kernel.k5.lds to ptr
-; CHECK-NEXT:  call void undef(ptr %1, ptr %2)
+; CHECK-NEXT:  call void poison(ptr %1, ptr %2)
 ;
-  call void undef(ptr addrspacecast (ptr addrspace(3) @lds.4 to ptr), ptr addrspacecast (ptr addrspace(3) @lds.4 to ptr))
+  call void poison(ptr addrspacecast (ptr addrspace(3) @lds.4 to ptr), ptr addrspacecast (ptr addrspace(3) @lds.4 to ptr))
   ret void
 }
 
- at lds.5 = internal addrspace(3) global [4 x i32] undef, align 4
+ at lds.5 = internal addrspace(3) global [4 x i32] poison, align 4
 
 ; Both the *value* and *pointer* operands of store instruction are constant expressions, and
 ; both of these constant expression paths use same lds - @lds.5. Hence both of these constant

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll
index 3ddddd01c139c0..95bf1f931c405d 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll
@@ -8,24 +8,24 @@
 ; CHECK: %llvm.amdgcn.kernel.k3.lds.t = type { [32 x i64], [32 x i32] }
 ; CHECK: %llvm.amdgcn.kernel.k4.lds.t = type { [2 x ptr addrspace(3)] }
 
-; SUPER-ALIGN_ON: @lds.unused = addrspace(3) global i32 undef, align 4
-; SUPER-ALIGN_OFF: @lds.unused = addrspace(3) global i32 undef, align 2
- at lds.unused = addrspace(3) global i32 undef, align 2
+; SUPER-ALIGN_ON: @lds.unused = addrspace(3) global i32 poison, align 4
+; SUPER-ALIGN_OFF: @lds.unused = addrspace(3) global i32 poison, align 2
+ at lds.unused = addrspace(3) global i32 poison, align 2
 
 @llvm.used = appending global [1 x ptr] [ptr addrspacecast (ptr addrspace(3) @lds.unused to ptr)], section "llvm.metadata"
 
 ; CHECK-NOT: @lds.1
- at lds.1 = internal unnamed_addr addrspace(3) global [32 x i8] undef, align 1
+ at lds.1 = internal unnamed_addr addrspace(3) global [32 x i8] poison, align 1
 
-; SUPER-ALIGN_ON: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 16
-; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 1
+; SUPER-ALIGN_ON: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 16
+; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 1
 
-; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t undef, align 4
-; SUPER-ALIGN_ON:  @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t undef, align 16
-; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t undef, align 8
+; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t poison, align 4
+; SUPER-ALIGN_ON:  @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t poison, align 16
+; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t poison, align 8
 
-; SUPER-ALIGN_ON:  @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t undef, align 16
-; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t undef, align 4
+; SUPER-ALIGN_ON:  @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t poison, align 16
+; SUPER-ALIGN_OFF: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t poison, align 4
 
 ; CHECK-LABEL: @k1
 ; CHECK:  %1 = addrspacecast ptr addrspace(3) @llvm.amdgcn.kernel.k1.lds to ptr
@@ -37,8 +37,8 @@ define amdgpu_kernel void @k1(i64 %x) {
   ret void
 }
 
- at lds.2 = internal unnamed_addr addrspace(3) global i16 undef, align 4
- at lds.3 = internal unnamed_addr addrspace(3) global i16 undef, align 4
+ at lds.2 = internal unnamed_addr addrspace(3) global i16 poison, align 4
+ at lds.3 = internal unnamed_addr addrspace(3) global i16 poison, align 4
 
 ; Check that alignment is propagated to uses for scalar variables.
 
@@ -51,8 +51,8 @@ define amdgpu_kernel void @k2() {
   ret void
 }
 
- at lds.4 = internal unnamed_addr addrspace(3) global [32 x i64] undef, align 8
- at lds.5 = internal unnamed_addr addrspace(3) global [32 x i32] undef, align 4
+ at lds.4 = internal unnamed_addr addrspace(3) global [32 x i64] poison, align 8
+ at lds.5 = internal unnamed_addr addrspace(3) global [32 x i32] poison, align 4
 
 ; Check that alignment is propagated to uses for arrays.
 
@@ -128,22 +128,22 @@ define amdgpu_kernel void @k3(i64 %x) {
   ret void
 }
 
- at lds.6 = internal unnamed_addr addrspace(3) global [2 x ptr addrspace(3)] undef, align 4
+ at lds.6 = internal unnamed_addr addrspace(3) global [2 x ptr addrspace(3)] poison, align 4
 
 ; Check that aligment is not propagated if use is not a pointer operand.
 
 ; CHECK-LABEL: @k4
-; SUPER-ALIGN_ON:  store i32 undef, ptr addrspace(3) %gep, align 8
-; SUPER-ALIGN_OFF: store i32 undef, ptr addrspace(3) %gep, align 4
-; CHECK:           store ptr addrspace(3) %gep, ptr undef, align 4
+; SUPER-ALIGN_ON:  store i32 poison, ptr addrspace(3) %gep, align 8
+; SUPER-ALIGN_OFF: store i32 poison, ptr addrspace(3) %gep, align 4
+; CHECK:           store ptr addrspace(3) %gep, ptr poison, align 4
 ; SUPER-ALIGN_ON:  %val1 = cmpxchg volatile ptr addrspace(3) %gep, i32 1, i32 2 monotonic monotonic, align 8
 ; SUPER-ALIGN_OFF: %val1 = cmpxchg volatile ptr addrspace(3) %gep, i32 1, i32 2 monotonic monotonic, align 4
-; CHECK:           %val2 = cmpxchg volatile ptr undef, ptr addrspace(3) %gep, ptr addrspace(3) undef monotonic monotonic, align 4
+; CHECK:           %val2 = cmpxchg volatile ptr poison, ptr addrspace(3) %gep, ptr addrspace(3) poison monotonic monotonic, align 4
 define amdgpu_kernel void @k4() {
   %gep = getelementptr inbounds ptr addrspace(3), ptr addrspace(3) @lds.6, i64 1
-  store i32 undef, ptr addrspace(3) %gep, align 4
-  store ptr addrspace(3) %gep, ptr undef, align 4
+  store i32 poison, ptr addrspace(3) %gep, align 4
+  store ptr addrspace(3) %gep, ptr poison, align 4
   %val1 = cmpxchg volatile ptr addrspace(3) %gep, i32 1, i32 2 monotonic monotonic, align 4
-  %val2 = cmpxchg volatile ptr undef, ptr addrspace(3) %gep, ptr addrspace(3) undef monotonic monotonic, align 4
+  %val2 = cmpxchg volatile ptr poison, ptr addrspace(3) %gep, ptr addrspace(3) poison monotonic monotonic, align 4
   ret void
 }

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll
index e9be71e8f48313..9013fdf6479215 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll
@@ -1,18 +1,18 @@
 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 ; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds --amdgpu-lower-module-lds-strategy=module < %s | FileCheck %s
 
- at lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 1
- at lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 2
- at lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] undef, align 4
- at lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] undef, align 16
+ at lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 1
+ at lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] poison, align 2
+ at lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] poison, align 4
+ at lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] poison, align 16
 
 ; CHECK: %llvm.amdgcn.kernel.k0.lds.t = type { [16 x i8], [4 x i8], [2 x i8], [1 x i8] }
 ; CHECK: %llvm.amdgcn.kernel.k1.lds.t = type { [16 x i8], [4 x i8], [2 x i8] }
 
 ;.
-; CHECK: @lds.k2 = addrspace(3) global [1 x i8] undef, align 1
-; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t undef, align 16, !absolute_symbol !0
-; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 16, !absolute_symbol !0
+; CHECK: @lds.k2 = addrspace(3) global [1 x i8] poison, align 1
+; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t poison, align 16, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 16, !absolute_symbol !0
 ;.
 define amdgpu_kernel void @k0() {
 ; CHECK-LABEL: @k0(
@@ -50,7 +50,7 @@ define amdgpu_kernel void @k1() {
 
 ; Do not lower LDS for graphics shaders.
 
- at lds.k2 = addrspace(3) global [1 x i8] undef, align 1
+ at lds.k2 = addrspace(3) global [1 x i8] poison, align 1
 
 define amdgpu_ps void @k2() {
 ; CHECK-LABEL: @k2(

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
index 72ba840c15f173..7a8a183ffbc92d 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
@@ -9,11 +9,11 @@
 
 $_f1 = comdat any
 $_f2 = comdat any
- at _f1 = linkonce_odr hidden local_unnamed_addr addrspace(3) global %vec_type undef, comdat, align 1
- at _f2 = linkonce_odr hidden local_unnamed_addr addrspace(3) global %vec_type undef, comdat, align 1
+ at _f1 = linkonce_odr hidden local_unnamed_addr addrspace(3) global %vec_type poison, comdat, align 1
+ at _f2 = linkonce_odr hidden local_unnamed_addr addrspace(3) global %vec_type poison, comdat, align 1
 
 ;.
-; CHECK: @[[LLVM_AMDGCN_KERNEL_TEST_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_TEST_LDS_T:%.*]] undef, align 4, !absolute_symbol !0
+; CHECK: @[[LLVM_AMDGCN_KERNEL_TEST_LDS:[a-zA-Z0-9_$"\\.-]+]] = internal addrspace(3) global [[LLVM_AMDGCN_KERNEL_TEST_LDS_T:%.*]] poison, align 4, !absolute_symbol !0
 ;.
 define protected amdgpu_kernel void @test(ptr addrspace(1) nocapture %ptr.coerce) local_unnamed_addr #0 {
 ; GCN-LABEL: test:

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll
index be9920b56c87c7..a2761193c2d657 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll
@@ -4,19 +4,19 @@
 ; CHECK: %llvm.amdgcn.module.lds.t = type { float, float }
 ; CHECK: %llvm.amdgcn.kernel.timestwo.lds.t = type { float, float }
 
- at a_func = addrspace(3) global float undef, align 4
+ at a_func = addrspace(3) global float poison, align 4
 
- at kern = addrspace(3) global float undef, align 4
+ at kern = addrspace(3) global float poison, align 4
 
 ; @a_func is only used from a non-kernel function so is rewritten
 ; CHECK-NOT: @a_func
 ; @b_both is used from a non-kernel function so is rewritten
 ; CHECK-NOT: @b_both
 ; sorted both < func, so @b_both at null and @a_func at 4
- at b_both = addrspace(3) global float undef, align 4
+ at b_both = addrspace(3) global float poison, align 4
 
-; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 4
-; CHECK: @llvm.amdgcn.kernel.timestwo.lds = internal addrspace(3) global %llvm.amdgcn.kernel.timestwo.lds.t undef, align 4
+; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 4
+; CHECK: @llvm.amdgcn.kernel.timestwo.lds = internal addrspace(3) global %llvm.amdgcn.kernel.timestwo.lds.t poison, align 4
 
 ; CHECK-LABEL: @get_func()
 ; CHECK:       %0 = addrspacecast ptr addrspace(3) @llvm.amdgcn.module.lds to ptr

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-indirect-extern-uses-max-reachable-alignment.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-indirect-extern-uses-max-reachable-alignment.ll
index 810e1edad10498..a5cc452a9c27ea 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-indirect-extern-uses-max-reachable-alignment.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-indirect-extern-uses-max-reachable-alignment.ll
@@ -15,7 +15,7 @@
 ; CHECK: %llvm.amdgcn.module.lds.t = type { i32 }
 ; CHECK: @dynamic_kernel_only = external addrspace(3) global [0 x double]
 ; CHECK: @dynamic_shared8 = external addrspace(3) global [0 x i64], align 8
-; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 4, !absolute_symbol !0
+; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 4, !absolute_symbol !0
 ; CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr addrspacecast (ptr addrspace(3) @llvm.amdgcn.module.lds to ptr)], section "llvm.metadata"
 
 ; Alignment of these must be the maximum of the alignment of the reachable symbols
@@ -75,7 +75,7 @@ define void @use_shared2() #0 {
 }
 
 ; Include a normal variable so that the new variables aren't all at the same absolute_symbol
- at static_shared = addrspace(3) global i32 undef
+ at static_shared = addrspace(3) global i32 poison
 define void @use_shared4() #0 {
 ; CHECK-LABEL: @use_shared4() #0 {
 ; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.lds.kernel.id()

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-used-list.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-used-list.ll
index b8e49d5c804558..7b534ab76f0e4d 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-used-list.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-used-list.ll
@@ -12,11 +12,11 @@
 ; @ignored still in list, @tolower removed
 ; CHECK: @llvm.used = appending global [1 x ptr] [ptr addrspacecast (ptr addrspace(1) @ignored to ptr)], section "llvm.metadata"
 
-; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 8
+; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 8
 
 ; CHECK-NOT: @tolower
 
- at tolower = addrspace(3) global float undef, align 8
+ at tolower = addrspace(3) global float poison, align 8
 
 ; A variable that is unchanged by pass
 @ignored = addrspace(1) global i64 0

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
index 98e5a6561af613..00a099e9b9c161 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
@@ -5,18 +5,18 @@
 ; Opt checks from utils/update_test_checks.py, llc checks from utils/update_llc_test_checks.py
 
 ; Define four variables and four non-kernel functions which access exactly one variable each
- at v0 = addrspace(3) global float undef
- at v1 = addrspace(3) global i16 undef, align 16
- at v2 = addrspace(3) global i64 undef
- at v3 = addrspace(3) global i8 undef
- at unused = addrspace(3) global i16 undef
+ at v0 = addrspace(3) global float poison
+ at v1 = addrspace(3) global i16 poison, align 16
+ at v2 = addrspace(3) global i64 poison
+ at v3 = addrspace(3) global i8 poison
+ at unused = addrspace(3) global i16 poison
 
-; OPT: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 16, !absolute_symbol !0
+; OPT: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 16, !absolute_symbol !0
 ; OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr addrspacecast (ptr addrspace(3) @llvm.amdgcn.module.lds to ptr)], section "llvm.metadata"
-; OPT: @llvm.amdgcn.kernel.kernel_no_table.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_no_table.lds.t undef, align 8, !absolute_symbol !0
-; OPT: @llvm.amdgcn.kernel.k01.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k01.lds.t undef, align 4, !absolute_symbol !1
-; OPT: @llvm.amdgcn.kernel.k23.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k23.lds.t undef, align 8, !absolute_symbol !0
-; OPT: @llvm.amdgcn.kernel.k123.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k123.lds.t undef, align 8, !absolute_symbol !2
+; OPT: @llvm.amdgcn.kernel.kernel_no_table.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_no_table.lds.t poison, align 8, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.k01.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k01.lds.t poison, align 4, !absolute_symbol !1
+; OPT: @llvm.amdgcn.kernel.k23.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k23.lds.t poison, align 8, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.k123.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k123.lds.t poison, align 8, !absolute_symbol !2
 ; OPT{LITERAL}: @llvm.amdgcn.lds.offset.table = internal addrspace(4) constant [2 x [1 x i32]] [[1 x i32] [i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k123.lds to i32)], [1 x i32] [i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k23.lds to i32)]]
 
 define void @f0() {

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-table.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-table.ll
index 306b04dcf30dd5..61bb25f3e42ace 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-table.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-table.ll
@@ -4,26 +4,26 @@
 ; Opt checks from utils/update_test_checks.py, llc checks from utils/update_llc_test_checks.py, both modified.
 
 ; Define four variables and four non-kernel functions which access exactly one variable each
- at v0 = addrspace(3) global float undef
- at v1 = addrspace(3) global i16 undef, align 16
- at v2 = addrspace(3) global i64 undef
- at v3 = addrspace(3) global i8 undef
- at unused = addrspace(3) global i16 undef
+ at v0 = addrspace(3) global float poison
+ at v1 = addrspace(3) global i16 poison, align 16
+ at v2 = addrspace(3) global i64 poison
+ at v3 = addrspace(3) global i8 poison
+ at unused = addrspace(3) global i16 poison
 
 ; OPT: %llvm.amdgcn.kernel.kernel_no_table.lds.t = type { i64 }
 ; OPT: %llvm.amdgcn.kernel.k01.lds.t = type { i16, [2 x i8], float }
 ; OPT: %llvm.amdgcn.kernel.k23.lds.t = type { i64, i8 }
 ; OPT: %llvm.amdgcn.kernel.k123.lds.t = type { i16, i8, [5 x i8], i64 }
 
-; OPT: @llvm.amdgcn.kernel.kernel_no_table.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_no_table.lds.t undef, align 8, !absolute_symbol !0
-; OPT: @llvm.amdgcn.kernel.k01.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k01.lds.t undef, align 16, !absolute_symbol !0
-; OPT: @llvm.amdgcn.kernel.k23.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k23.lds.t undef, align 8, !absolute_symbol !0
-; OPT: @llvm.amdgcn.kernel.k123.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k123.lds.t undef, align 16, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.kernel_no_table.lds = internal addrspace(3) global %llvm.amdgcn.kernel.kernel_no_table.lds.t poison, align 8, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.k01.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k01.lds.t poison, align 16, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.k23.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k23.lds.t poison, align 8, !absolute_symbol !0
+; OPT: @llvm.amdgcn.kernel.k123.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k123.lds.t poison, align 16, !absolute_symbol !0
 
 ; Salient parts of the IR lookup table check:
 ; It has (top level) size 3 as there are 3 kernels that call functions which use lds
 ; The next level down has type [4 x i16] as there are 4 variables accessed by functions which use lds
-; The kernel naming pattern and the structs being named after the functions helps verify placement of undef
+; The kernel naming pattern and the structs being named after the functions helps verify placement of poison
 ; The remainder are constant expressions into the variable instances checked above
 
 ; OPT{LITERAL}: @llvm.amdgcn.lds.offset.table = internal addrspace(4) constant [3 x [4 x i32]] [[4 x i32] [i32 ptrtoint (ptr addrspace(3) getelementptr inbounds (%llvm.amdgcn.kernel.k01.lds.t, ptr addrspace(3) @llvm.amdgcn.kernel.k01.lds, i32 0, i32 2) to i32), i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k01.lds to i32), i32 poison, i32 poison], [4 x i32] [i32 poison, i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k123.lds to i32), i32 ptrtoint (ptr addrspace(3) getelementptr inbounds (%llvm.amdgcn.kernel.k123.lds.t, ptr addrspace(3) @llvm.amdgcn.kernel.k123.lds, i32 0, i32 3) to i32), i32 ptrtoint (ptr addrspace(3) getelementptr inbounds (%llvm.amdgcn.kernel.k123.lds.t, ptr addrspace(3) @llvm.amdgcn.kernel.k123.lds, i32 0, i32 1) to i32)], [4 x i32] [i32 poison, i32 poison, i32 ptrtoint (ptr addrspace(3) @llvm.amdgcn.kernel.k23.lds to i32), i32 ptrtoint (ptr addrspace(3) getelementptr inbounds (%llvm.amdgcn.kernel.k23.lds.t, ptr addrspace(3) @llvm.amdgcn.kernel.k23.lds, i32 0, i32 1) to i32)]]

diff  --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds.ll
index bd181390ef589e..a6c87d4e972f52 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds.ll
@@ -8,11 +8,11 @@
 ; Variable removed by pass
 ; CHECK-NOT: @var0
 
- at var0 = addrspace(3) global float undef, align 8
- at var1 = addrspace(3) global i32 undef, align 8
+ at var0 = addrspace(3) global float poison, align 8
+ at var1 = addrspace(3) global i32 poison, align 8
 
 ; The invalid use by the global is left unchanged
-; CHECK: @var1 = addrspace(3) global i32 undef, align 8
+; CHECK: @var1 = addrspace(3) global i32 poison, align 8
 ; CHECK: @ptr = addrspace(1) global ptr addrspace(3) @var1, align 4
 @ptr = addrspace(1) global ptr addrspace(3) @var1, align 4
 
@@ -21,7 +21,7 @@
 @with_init = addrspace(3) global i64 0
 
 ; Instance of new type, aligned to max of element alignment
-; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t undef, align 8
+; CHECK: @llvm.amdgcn.module.lds = internal addrspace(3) global %llvm.amdgcn.module.lds.t poison, align 8
 
 ; Use in func rewritten to access struct at address zero
 ; CHECK-LABEL: @func()

diff  --git a/llvm/test/CodeGen/AMDGPU/update-lds-alignment.ll b/llvm/test/CodeGen/AMDGPU/update-lds-alignment.ll
index 2d86a3540d7c8d..83644f1d588635 100644
--- a/llvm/test/CodeGen/AMDGPU/update-lds-alignment.ll
+++ b/llvm/test/CodeGen/AMDGPU/update-lds-alignment.ll
@@ -19,12 +19,12 @@
 ; All LDS are properly aligned on 16 byte boundary, but they are of 
diff erent size.
 ; CHECK: %llvm.amdgcn.kernel.k5.lds.t = type { [20 x i8], [12 x i8], [19 x i8], [13 x i8], [18 x i8], [14 x i8], [17 x i8] }
 
-; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t undef, align 8
-; CHECK: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t undef, align 16
-; CHECK: @llvm.amdgcn.kernel.k5.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k5.lds.t undef, align 16
+; CHECK: @llvm.amdgcn.kernel.k0.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k0.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k1.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k1.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k2.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k2.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k3.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k3.lds.t poison, align 8
+; CHECK: @llvm.amdgcn.kernel.k4.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k4.lds.t poison, align 16
+; CHECK: @llvm.amdgcn.kernel.k5.lds = internal addrspace(3) global %llvm.amdgcn.kernel.k5.lds.t poison, align 16
 
 
 ; Properly aligned, same size as alignment.
@@ -33,11 +33,11 @@
 ; CHECK-NOT: @k0.lds.size.4.align.4
 ; CHECK-NOT: @k0.lds.size.8.align.8
 ; CHECK-NOT: @k0.lds.size.16.align.16
- at k0.lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 1
- at k0.lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 2
- at k0.lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] undef, align 4
- at k0.lds.size.8.align.8 = internal unnamed_addr addrspace(3) global [8 x i8] undef, align 8
- at k0.lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] undef, align 16
+ at k0.lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 1
+ at k0.lds.size.2.align.2 = internal unnamed_addr addrspace(3) global [2 x i8] poison, align 2
+ at k0.lds.size.4.align.4 = internal unnamed_addr addrspace(3) global [4 x i8] poison, align 4
+ at k0.lds.size.8.align.8 = internal unnamed_addr addrspace(3) global [8 x i8] poison, align 8
+ at k0.lds.size.16.align.16 = internal unnamed_addr addrspace(3) global [16 x i8] poison, align 16
 
 define amdgpu_kernel void @k0() {
    store i8 1, ptr addrspace(3) @k0.lds.size.1.align.1, align 1
@@ -59,11 +59,11 @@ define amdgpu_kernel void @k0() {
 ; CHECK-NOT: @k1.lds.size.1.align.4
 ; CHECK-NOT: @k1.lds.size.1.align.8
 ; CHECK-NOT: @k1.lds.size.1.align.16
- at k1.lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 1
- at k1.lds.size.1.align.2 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 2
- at k1.lds.size.1.align.4 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 4
- at k1.lds.size.1.align.8 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 8
- at k1.lds.size.1.align.16 = internal unnamed_addr addrspace(3) global [1 x i8] undef, align 16
+ at k1.lds.size.1.align.1 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 1
+ at k1.lds.size.1.align.2 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 2
+ at k1.lds.size.1.align.4 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 4
+ at k1.lds.size.1.align.8 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 8
+ at k1.lds.size.1.align.16 = internal unnamed_addr addrspace(3) global [1 x i8] poison, align 16
 
 define amdgpu_kernel void @k1() {
    store i8 1, ptr addrspace(3) @k1.lds.size.1.align.1, align 1
@@ -84,10 +84,10 @@ define amdgpu_kernel void @k1() {
 ; CHECK-NOT: @k2.lds.size.3.align.2
 ; CHECK-NOT: @k2.lds.size.5.align.4
 ; CHECK-NOT: @k2.lds.size.9.align.8
- at k2.lds.size.2.align.1 = internal unnamed_addr addrspace(3) global [2 x i8] undef, align 1
- at k2.lds.size.3.align.2 = internal unnamed_addr addrspace(3) global [3 x i8] undef, align 2
- at k2.lds.size.5.align.4 = internal unnamed_addr addrspace(3) global [5 x i8] undef, align 4
- at k2.lds.size.9.align.8 = internal unnamed_addr addrspace(3) global [9 x i8] undef, align 8
+ at k2.lds.size.2.align.1 = internal unnamed_addr addrspace(3) global [2 x i8] poison, align 1
+ at k2.lds.size.3.align.2 = internal unnamed_addr addrspace(3) global [3 x i8] poison, align 2
+ at k2.lds.size.5.align.4 = internal unnamed_addr addrspace(3) global [5 x i8] poison, align 4
+ at k2.lds.size.9.align.8 = internal unnamed_addr addrspace(3) global [9 x i8] poison, align 8
 
 define amdgpu_kernel void @k2() {
    store i8 1, ptr addrspace(3) @k2.lds.size.2.align.1, align 1
@@ -106,10 +106,10 @@ define amdgpu_kernel void @k2() {
 ; CHECK-NOT: @k3.lds.size.6.align.2
 ; CHECK-NOT: @k3.lds.size.7.align.2
 ; CHECK-NOT: @k3.lds.size.7.align.4
- at k3.lds.size.5.align.2 = internal unnamed_addr addrspace(3) global [5 x i8] undef, align 2
- at k3.lds.size.6.align.2 = internal unnamed_addr addrspace(3) global [6 x i8] undef, align 2
- at k3.lds.size.7.align.2 = internal unnamed_addr addrspace(3) global [7 x i8] undef, align 2
- at k3.lds.size.7.align.4 = internal unnamed_addr addrspace(3) global [7 x i8] undef, align 4
+ at k3.lds.size.5.align.2 = internal unnamed_addr addrspace(3) global [5 x i8] poison, align 2
+ at k3.lds.size.6.align.2 = internal unnamed_addr addrspace(3) global [6 x i8] poison, align 2
+ at k3.lds.size.7.align.2 = internal unnamed_addr addrspace(3) global [7 x i8] poison, align 2
+ at k3.lds.size.7.align.4 = internal unnamed_addr addrspace(3) global [7 x i8] poison, align 4
 
 define amdgpu_kernel void @k3() {
    store i8 1, ptr addrspace(3) @k3.lds.size.5.align.2, align 2
@@ -128,10 +128,10 @@ define amdgpu_kernel void @k3() {
 ; CHECK-NOT: @k4.lds.size.10.align.2
 ; CHECK-NOT: @k4.lds.size.11.align.4
 ; CHECK-NOT: @k4.lds.size.12.align.8
- at k4.lds.size.9.align.1 = internal unnamed_addr addrspace(3) global [9 x i8] undef, align 1
- at k4.lds.size.10.align.2 = internal unnamed_addr addrspace(3) global [10 x i8] undef, align 2
- at k4.lds.size.11.align.4 = internal unnamed_addr addrspace(3) global [11 x i8] undef, align 4
- at k4.lds.size.12.align.8 = internal unnamed_addr addrspace(3) global [12 x i8] undef, align 8
+ at k4.lds.size.9.align.1 = internal unnamed_addr addrspace(3) global [9 x i8] poison, align 1
+ at k4.lds.size.10.align.2 = internal unnamed_addr addrspace(3) global [10 x i8] poison, align 2
+ at k4.lds.size.11.align.4 = internal unnamed_addr addrspace(3) global [11 x i8] poison, align 4
+ at k4.lds.size.12.align.8 = internal unnamed_addr addrspace(3) global [12 x i8] poison, align 8
 
 define amdgpu_kernel void @k4() {
    store i8 1, ptr addrspace(3) @k4.lds.size.9.align.1, align 1
@@ -149,10 +149,10 @@ define amdgpu_kernel void @k4() {
 ; CHECK-NOT: @k5.lds.size.18.align.16
 ; CHECK-NOT: @k5.lds.size.19.align.16
 ; CHECK-NOT: @k5.lds.size.20.align.16
- at k5.lds.size.17.align.16 = internal unnamed_addr addrspace(3) global [17 x i8] undef, align 16
- at k5.lds.size.18.align.16 = internal unnamed_addr addrspace(3) global [18 x i8] undef, align 16
- at k5.lds.size.19.align.16 = internal unnamed_addr addrspace(3) global [19 x i8] undef, align 16
- at k5.lds.size.20.align.16 = internal unnamed_addr addrspace(3) global [20 x i8] undef, align 16
+ at k5.lds.size.17.align.16 = internal unnamed_addr addrspace(3) global [17 x i8] poison, align 16
+ at k5.lds.size.18.align.16 = internal unnamed_addr addrspace(3) global [18 x i8] poison, align 16
+ at k5.lds.size.19.align.16 = internal unnamed_addr addrspace(3) global [19 x i8] poison, align 16
+ at k5.lds.size.20.align.16 = internal unnamed_addr addrspace(3) global [20 x i8] poison, align 16
 
 define amdgpu_kernel void @k5() {
    store i8 1, ptr addrspace(3) @k5.lds.size.17.align.16, align 16


        


More information about the llvm-commits mailing list