[Mlir-commits] [mlir] [MemRef] Document `subview` runtime verifier (PR #214506)
ioana ghiban
llvmlistbot at llvm.org
Thu Aug 6 08:10:49 PDT 2026
https://github.com/ioghiban created https://github.com/llvm/llvm-project/pull/214506
Make the option of runtime verification of `memref.subview` explicit via documentation.
>From effe09c58ab9eba0682e507c8de4b1b9a87148ac Mon Sep 17 00:00:00 2001
From: Ioana Ghiban <ioana.ghiban at arm.com>
Date: Thu, 6 Aug 2026 17:03:47 +0200
Subject: [PATCH] [MemRef] Document `subview` runtime verifier
---
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index 8f530b2dbd62e..052462dbdf6d3 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -2174,8 +2174,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