[Mlir-commits] [mlir] [MLIR] Determine contiguousness of memrefs with dynamic dimensions (PR #142421)

James Newling llvmlistbot at llvm.org
Thu Jun 5 07:47:35 PDT 2025


================
@@ -69,7 +69,8 @@ SmallVector<ExprType> delinearizeImpl(ExprType linearIndex,
 //===----------------------------------------------------------------------===//
 
 SmallVector<int64_t> mlir::computeSuffixProduct(ArrayRef<int64_t> sizes) {
-  assert(llvm::all_of(sizes, [](int64_t s) { return s >= 0; }) &&
+  assert((sizes.size() == 0 ||
----------------
newling wrote:

```suggestion
  assert((!sizes.empty() ||
```

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


More information about the Mlir-commits mailing list