[llvm] 3e16167 - AMDGPU: Use getTypeStoreSizeInBits

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 08:01:43 PDT 2023


Author: Matt Arsenault
Date: 2023-04-29T10:35:06-04:00
New Revision: 3e16167c14e711d7793dc762a7c432aed1e7cb5f

URL: https://github.com/llvm/llvm-project/commit/3e16167c14e711d7793dc762a7c432aed1e7cb5f
DIFF: https://github.com/llvm/llvm-project/commit/3e16167c14e711d7793dc762a7c432aed1e7cb5f.diff

LOG: AMDGPU: Use getTypeStoreSizeInBits

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
index 7351a9c8f7b6..fb7148ba10ac 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
@@ -156,7 +156,7 @@ bool AMDGPULateCodeGenPrepare::visitLoadInst(LoadInst &LI) {
   IRBuilder<> IRB(&LI);
   IRB.SetCurrentDebugLocation(LI.getDebugLoc());
 
-  unsigned LdBits = DL->getTypeStoreSize(LI.getType()) * 8;
+  unsigned LdBits = DL->getTypeStoreSizeInBits(LI.getType());
   auto IntNTy = Type::getIntNTy(LI.getContext(), LdBits);
 
   auto *NewPtr = IRB.CreateConstGEP1_64(


        


More information about the llvm-commits mailing list