[Mlir-commits] [mlir] [mlir][nvgpu] Fix a division by zero crash in OptimizeSharedMemoryPass (PR #174931)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Jan 14 18:16:53 PST 2026
================
@@ -166,6 +166,9 @@ mlir::nvgpu::optimizeSharedMemoryReadsAndWrites(Operation *parentOp,
// Check if this is necessary given the assumption of 128b accesses:
// If dim[rank-1] is small enough to fit 8 rows in a 128B line.
const int64_t rowSize = memRefType.getDimSize(memRefType.getRank() - 1);
+ if (rowSize == ShapedType::kDynamic || rowSize == 0)
----------------
kuhar wrote:
nit: use `ShapedType::isDynamic(rowSize)`
https://github.com/llvm/llvm-project/pull/174931
More information about the Mlir-commits
mailing list