[llvm] [AMDGPU] Skip handling of non-byte types in promote alloca. (PR #128769)
Sumanth Gundapaneni via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 13:21:53 PST 2025
================
@@ -776,8 +784,7 @@ bool AMDGPUPromoteAllocaImpl::tryPromoteAllocaToVector(AllocaInst &Alloca) {
LLVM_DEBUG(dbgs() << " Attempting promotion to: " << *VectorTy << "\n");
- Type *VecEltTy = VectorTy->getElementType();
- unsigned ElementSize = DL->getTypeSizeInBits(VecEltTy) / 8;
+ unsigned ElementSize = ElementSizeInBits / SIZE_OF_BYTE;
----------------
sgundapa wrote:
You mean , to use some thing like this to derive the value from data layout "DL.getTypeSizeInBits(Type::getInt8Ty(M->getContext()))".
https://github.com/llvm/llvm-project/pull/128769
More information about the llvm-commits
mailing list