Skip to content

Commit 2f89c1c

Browse files
[AMDGPU][NFC] Remove duplicate code by using getAddressableLocalMemorySize (#104604)
1 parent d257cd8 commit 2f89c1c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,7 @@ unsigned getWavefrontSize(const MCSubtargetInfo *STI) {
906906
}
907907

908908
unsigned getLocalMemorySize(const MCSubtargetInfo *STI) {
909-
unsigned BytesPerCU = 0;
910-
if (STI->getFeatureBits().test(FeatureLocalMemorySize32768))
911-
BytesPerCU = 32768;
912-
if (STI->getFeatureBits().test(FeatureLocalMemorySize65536))
913-
BytesPerCU = 65536;
909+
unsigned BytesPerCU = getAddressableLocalMemorySize(STI);
914910

915911
// "Per CU" really means "per whatever functional block the waves of a
916912
// workgroup must share". So the effective local memory size is doubled in

0 commit comments

Comments
 (0)