================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to