[llvm-branch-commits] [mlir] [mlir] Migrate AMDGPU/ROCDL to targets, not chipset versions (PR #223563)

Mehdi Amini via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 25 07:41:38 PDT 2026


================
@@ -172,10 +106,9 @@ static Value getNumRecords(ConversionPatternRewriter &rewriter, Location loc,
                            MemRefType memrefType,
                            MemRefDescriptor &memrefDescriptor,
                            ArrayRef<int64_t> strides, int64_t elementByteWidth,
-                           amdgpu::Chipset chipset, bool boundsCheck) {
-  if (has45BitNumRecordsBufferResource(chipset) && !boundsCheck) {
-    constexpr int64_t first45bits = (1ll << 45) - 1;
-    return createI64Constant(rewriter, loc, first45bits);
+                           unsigned numRecordsWidth, bool boundsCheck) {
+  if (numRecordsWidth > 32 && !boundsCheck) {
+    return createI64Constant(rewriter, loc, llvm::maxUIntN(numRecordsWidth));
   }
----------------
joker-eph wrote:

Nit: remove braces. 

https://github.com/llvm/llvm-project/pull/223563


More information about the llvm-branch-commits mailing list