[llvm] [AMDGPU][LSV] Restrict large vectors (PR #92540)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 06:46:19 PDT 2024
================
@@ -364,19 +364,14 @@ unsigned GCNTTIImpl::getStoreVectorFactor(unsigned VF, unsigned StoreSize,
}
unsigned GCNTTIImpl::getLoadStoreVecRegBitWidth(unsigned AddrSpace) const {
- if (AddrSpace == AMDGPUAS::GLOBAL_ADDRESS ||
- AddrSpace == AMDGPUAS::CONSTANT_ADDRESS ||
- AddrSpace == AMDGPUAS::CONSTANT_ADDRESS_32BIT ||
- AddrSpace == AMDGPUAS::BUFFER_FAT_POINTER ||
- AddrSpace == AMDGPUAS::BUFFER_RESOURCE ||
- AddrSpace == AMDGPUAS::BUFFER_STRIDED_POINTER) {
- return 512;
- }
-
if (AddrSpace == AMDGPUAS::PRIVATE_ADDRESS)
return 8 * ST->getMaxPrivateElementSize();
- // Common to flat, global, local and region. Assume for unknown addrspace.
+ // Common to other address spaces: flat, global, buffer, local and region.
+ // Assume for unknown addrspace. For constant, we also return 128 here despite
+ // support for wide scalar loads, because very large vectors can cause
+ // problems in the backend: high register pressure or increased
+ // fragmentation.
----------------
arsenm wrote:
Probably should add a fixme here, we should try to form 512 if we were better at rematerializing partial vectors
https://github.com/llvm/llvm-project/pull/92540
More information about the llvm-commits
mailing list