[llvm-branch-commits] [clang] [llvm] [mlir] [AMDGPU] Canonicalize num_records to its actual width in InstCombine (PR #217068)
Krzysztof Drewniak via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 18 11:19:13 PDT 2026
================
@@ -353,6 +353,16 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
bool hasRelaxedBufferOOBMode() const { return BufferOOBRelaxed; }
bool hasRelaxedTBufferOOBMode() const { return TBufferOOBRelaxed; }
+ // Return the width of the num_records field in buffer resources if it
+ // has a known value.
+ std::optional<unsigned> getBufferResourceNumRecordsWidth() const {
+ if (AMDGPU::isPseudoTarget(getCPU()))
+ return std::nullopt;
+ if (has45BitNumRecordsBufferResource())
----------------
krzysz00 wrote:
Makes sense, will change that out
https://github.com/llvm/llvm-project/pull/217068
More information about the llvm-branch-commits
mailing list