[Mlir-commits] [mlir] [mlir][nvgpu] Fix crash when handling 0D memref in OptimizeSharedMemoryPass (PR #124517)

Guray Ozen llvmlistbot at llvm.org
Sun Jan 26 23:46:54 PST 2025


================
@@ -152,6 +152,9 @@ mlir::nvgpu::optimizeSharedMemoryReadsAndWrites(Operation *parentOp,
   if (!memRefType || !NVGPUDialect::hasSharedMemoryAddressSpace(memRefType))
     return failure();
 
+  if (memRefType.getRank() == 0)
+    return failure();
----------------
grypp wrote:

Can we add one-line comment here why do we return failure

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


More information about the Mlir-commits mailing list