[AMDGPU] Common up two local memory size calculations. NFCI. (#154784)

This commit is contained in:
Jay Foad 2025-08-22 08:44:11 +01:00 committed by GitHub
parent 50f7c6a5b9
commit cf5243619a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -140,10 +140,7 @@ GCNSubtarget &GCNSubtarget::initializeSubtargetDependencies(const Triple &TT,
if (AddressableLocalMemorySize == 0)
AddressableLocalMemorySize = 32768;
LocalMemorySize = AddressableLocalMemorySize;
if (AMDGPU::isGFX10Plus(*this) &&
!getFeatureBits().test(AMDGPU::FeatureCuMode))
LocalMemorySize *= 2;
LocalMemorySize = AMDGPU::IsaInfo::getLocalMemorySize(this);
HasFminFmaxLegacy = getGeneration() < AMDGPUSubtarget::VOLCANIC_ISLANDS;
HasSMulHi = getGeneration() >= AMDGPUSubtarget::GFX9;

View File

@ -1163,7 +1163,7 @@ unsigned getAddressableLocalMemorySize(const MCSubtargetInfo *STI) {
return 163840;
if (STI->getFeatureBits().test(FeatureAddressableLocalMemorySize327680))
return 327680;
return 0;
return 32768;
}
unsigned getEUsPerCU(const MCSubtargetInfo *STI) {