[Mlir-commits] [mlir] 8871d82 - [mlir][MemRef] NFC - Improve assertion error message

Nicolas Vasilache llvmlistbot at llvm.org
Sun Jan 9 11:17:40 PST 2022


Author: Nicolas Vasilache
Date: 2022-01-09T14:17:37-05:00
New Revision: 8871d8236a9f542014713adc3da52f82395d3b5a

URL: https://github.com/llvm/llvm-project/commit/8871d8236a9f542014713adc3da52f82395d3b5a
DIFF: https://github.com/llvm/llvm-project/commit/8871d8236a9f542014713adc3da52f82395d3b5a.diff

LOG: [mlir][MemRef] NFC - Improve assertion error message

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index ced119aea1a46..5dec3b717bcf0 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -1497,9 +1497,9 @@ Type SubViewOp::inferResultType(MemRefType sourceMemRefType,
                                 ArrayRef<int64_t> staticStrides) {
   unsigned rank = sourceMemRefType.getRank();
   (void)rank;
-  assert(staticOffsets.size() == rank && "unexpected staticOffsets overflow");
-  assert(staticSizes.size() == rank && "unexpected staticSizes overflow");
-  assert(staticStrides.size() == rank && "unexpected staticStrides overflow");
+  assert(staticOffsets.size() == rank && "staticOffsets length mismatch");
+  assert(staticSizes.size() == rank && "staticSizes length mismatch");
+  assert(staticStrides.size() == rank && "staticStrides length mismatch");
 
   // Extract source offset and strides.
   int64_t sourceOffset;


        


More information about the Mlir-commits mailing list