Skip to content

Commit c83d9e9

Browse files
authored
[mlir][vector] Specify bounds of dynamic indices in vector.extract/insert (llvm#95933)
1 parent 5574a58 commit c83d9e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,10 @@ def Vector_ExtractOp :
680680
Takes an n-D vector and a k-D position and extracts the (n-k)-D vector at
681681
the proper position. Degenerates to an element type if n-k is zero.
682682

683+
Dynamic indices must be greater or equal to zero and less than the size of
684+
the corresponding dimension. The result is undefined if any index is
685+
out-of-bounds.
686+
683687
Example:
684688

685689
```mlir
@@ -862,6 +866,10 @@ def Vector_InsertOp :
862866
and inserts the n-D source into the (n+k)-D destination at the proper
863867
position. Degenerates to a scalar or a 0-d vector source type when n = 0.
864868

869+
Dynamic indices must be greater or equal to zero and less than the size of
870+
the corresponding dimension. The result is undefined if any index is
871+
out-of-bounds.
872+
865873
Example:
866874

867875
```mlir

0 commit comments

Comments
 (0)