Skip to content

Commit e19d7f3

Browse files
committed
[mlir][Vector] Depreciate vector.extractelement/vector.insertelement
1 parent 7fe149c commit e19d7f3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,13 @@ def Vector_ExtractElementOp :
635635
Results<(outs AnyType:$result)> {
636636
let summary = "extractelement operation";
637637
let description = [{
638+
Note: This operation is depreciated. Please use vector.extract insert.
639+
638640
Takes a 0-D or 1-D vector and a optional dynamic index position and
639641
extracts the scalar at that position.
640642

641643
Note that this instruction resembles vector.extract, but is restricted to
642-
0-D and 1-D vectors and relaxed to dynamic indices.
644+
0-D and 1-D vectors.
643645
If the vector is 0-D, the position must be std::nullopt.
644646

645647

@@ -819,11 +821,13 @@ def Vector_InsertElementOp :
819821
Results<(outs AnyVectorOfAnyRank:$result)> {
820822
let summary = "insertelement operation";
821823
let description = [{
824+
Note: This operation is depreciated. Please use vector.insert instead.
825+
822826
Takes a scalar source, a 0-D or 1-D destination vector and a dynamic index
823827
position and inserts the source into the destination at the proper position.
824828

825829
Note that this instruction resembles vector.insert, but is restricted to 0-D
826-
and 1-D vectors and relaxed to dynamic indices.
830+
and 1-D vectors.
827831

828832
It is meant to be closer to LLVM's version:
829833
https://llvm.org/docs/LangRef.html#insertelement-instruction

0 commit comments

Comments
 (0)