[llvm] [AMDGPU] Use subtarget feature for flat offset bit width instead of arch checks (PR #183742)
Mariusz Sikora via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 23:28:40 PST 2026
================
@@ -59,6 +59,7 @@ class AMDGPUSubtarget {
unsigned LocalMemorySize = 0;
unsigned AddressableLocalMemorySize = 0;
char WavefrontSizeLog2 = 0;
+ unsigned FlatOffsetBitWidth = 13;
----------------
mariusz-sikora-at-amd wrote:
Thanks for pointing this out.
In that case, I’m thinking of simply setting `FlatOffsetBitWidth` to `0` by default. We never access the field directly, it’s only read through `getNumFlatOffsetBits()`.
Alternatively, I could replace this with two boolean AMDGPUSubtargetFeatures instead of an unsigned value, if that would be preferable.
https://github.com/llvm/llvm-project/pull/183742
More information about the llvm-commits
mailing list