================
@@ -1179,17 +1179,8 @@ unsigned getWavefrontSize(const MCSubtargetInfo &STI) {
// Maximum LDS a single work-group can address. This is a fixed HW cap. It does
// not depend on how many SIMDs a work-group runs on.
static unsigned getMaxHWAddressableLocalMemorySize(const MCSubtargetInfo &STI)
{
- if (STI.getFeatureBits().test(FeatureAddressableLocalMemorySize32768))
- return 32768;
- if (STI.getFeatureBits().test(FeatureAddressableLocalMemorySize65536))
- return 65536;
- if (STI.getFeatureBits().test(FeatureAddressableLocalMemorySize163840))
- return 163840;
- if (STI.getFeatureBits().test(FeatureAddressableLocalMemorySize196608))
- return 196608;
- if (STI.getFeatureBits().test(FeatureAddressableLocalMemorySize327680))
- return 327680;
- return 32768;
+ return AMDGPU::getMaxHWAddressableLocalMemorySize(
+ parseArchAMDGCN(STI.getCPU()));
----------------
arsenm wrote:
This is worse. No target query should ever parse the CPU
https://github.com/llvm/llvm-project/pull/219020
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits