[PATCH] D155699: [AMDGPU] Allow vector access types in PromoteAllocaToVector
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 06:11:56 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:456
+ Type *AccessTy = Val->getType();
+ unsigned AccessSize = DL.getTypeStoreSize(AccessTy);
+ if (AccessSize == VecStoreSize && cast<Constant>(Index)->isZeroValue()) {
----------------
TypeSize?
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:467
+ if (isa<FixedVectorType>(AccessTy)) {
+ assert(AccessSize % DL.getTypeStoreSize(VecEltTy) == 0);
+ const unsigned NumElts = AccessSize / DL.getTypeStoreSize(VecEltTy);
----------------
isKnownMultipleOf
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155699/new/
https://reviews.llvm.org/D155699
More information about the llvm-commits
mailing list