[Mlir-commits] [mlir] 034b7f5 - [mlir][MemRef] Document `subview` runtime verifier (#214506)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Aug 17 04:53:24 PDT 2026


Author: ioana ghiban
Date: 2026-08-17T11:53:19Z
New Revision: 034b7f56c96e34adc97c59b605beda4af84a5167

URL: https://github.com/llvm/llvm-project/commit/034b7f56c96e34adc97c59b605beda4af84a5167
DIFF: https://github.com/llvm/llvm-project/commit/034b7f56c96e34adc97c59b605beda4af84a5167.diff

LOG: [mlir][MemRef] Document `subview` runtime verifier (#214506)

Make the option of runtime verification of `memref.subview` explicit via
documentation.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index 3122e7b633870..4172b13dbdabc 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -2180,8 +2180,10 @@ def SubViewOp : MemRef_OpWithOffsetSizesAndStrides<"subview", [
     The offset, size and stride operands must be in-bounds with respect to the
     source memref. When possible, the static operation verifier will detect
     out-of-bounds subviews. Subviews that cannot be confirmed to be in-bounds
-    or out-of-bounds based on compile-time information are valid. However,
-    performing an out-of-bounds subview at runtime is undefined behavior.
+    or out-of-bounds based on compile-time information are valid. The
+    `-generate-runtime-verification` pass can insert runtime bound checks.
+    Otherwise, performing an out-of-bounds subview at runtime is undefined
+    behavior.
 
     Example 1:
 


        


More information about the Mlir-commits mailing list