[Mlir-commits] [mlir] c83d9e9 - [mlir][vector] Specify bounds of dynamic indices in vector.extract/insert (#95933)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 19 06:45:07 PDT 2024


Author: Benjamin Maxwell
Date: 2024-06-19T14:45:04+01:00
New Revision: c83d9e99b0663cf8e7e81bd552d42a0c4298ab2c

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

LOG: [mlir][vector] Specify bounds of dynamic indices in vector.extract/insert (#95933)

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index c30996351c672..097e5e6fb0d61 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -680,6 +680,10 @@ def Vector_ExtractOp :
     Takes an n-D vector and a k-D position and extracts the (n-k)-D vector at
     the proper position. Degenerates to an element type if n-k is zero.
 
+    Dynamic indices must be greater or equal to zero and less than the size of
+    the corresponding dimension. The result is undefined if any index is
+    out-of-bounds.
+
     Example:
 
     ```mlir
@@ -862,6 +866,10 @@ def Vector_InsertOp :
     and inserts the n-D source into the (n+k)-D destination at the proper
     position. Degenerates to a scalar or a 0-d vector source type when n = 0.
 
+    Dynamic indices must be greater or equal to zero and less than the size of
+    the corresponding dimension. The result is undefined if any index is
+    out-of-bounds.
+
     Example:
 
     ```mlir


        


More information about the Mlir-commits mailing list