Skip to content

Commit 80522f9

Browse files
mariusz-sikora-at-amdpravinjagtap
authored andcommitted
[AMDGPU][NFC] Remove duplicate code by using getAddressableLocalMemorySize (llvm#104604)
1 parent 3cdaf2c commit 80522f9

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
@@ -918,11 +918,7 @@ unsigned getWavefrontSize(const MCSubtargetInfo *STI) {
918918
}
919919

920920
unsigned getLocalMemorySize(const MCSubtargetInfo *STI) {
921-
unsigned BytesPerCU = 0;
922-
if (STI->getFeatureBits().test(FeatureLocalMemorySize32768))
923-
BytesPerCU = 32768;
924-
if (STI->getFeatureBits().test(FeatureLocalMemorySize65536))
925-
BytesPerCU = 65536;
921+
unsigned BytesPerCU = getAddressableLocalMemorySize(STI);
926922

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

0 commit comments

Comments
 (0)