aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2023-09-02 11:13:18 -0400
committerMatt Arsenault <Matthew.Arsenault@amd.com>2023-09-02 11:33:26 -0400
commit1f52060000f1fead314f7173f4c62bc58b9ca7c3 (patch)
tree7d6a4e6849553b48fadbcc387aa1089eb18b7207 /llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
parent6ff7ef433158b3af6e8d383ef6ed48c97fe23423 (diff)
downloadllvm-1f52060000f1fead314f7173f4c62bc58b9ca7c3.zip
llvm-1f52060000f1fead314f7173f4c62bc58b9ca7c3.tar.gz
llvm-1f52060000f1fead314f7173f4c62bc58b9ca7c3.tar.bz2
AMDGPU: Use poison instead of undef in module lds pass
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index e3a6459..6d408d2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -1367,9 +1367,9 @@ private:
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 @@ private:
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);