diff --git a/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp b/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp index ca35cc5da5b..dabb4d006d9 100644 --- a/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp +++ b/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp @@ -302,7 +302,7 @@ class ReplaceLDSUseImpl { // Insert required set of instructions which replace LDS within F. auto *V = Builder.CreateBitCast( Builder.CreateGEP( - LDSMemBaseAddr, + Builder.getInt8Ty(), LDSMemBaseAddr, Builder.CreateLoad(LDSPointer->getValueType(), LDSPointer)), GV->getType());