[Mlir-commits] [mlir] [mlir][vector] Restrict vector.insert/vector.extract (PR #121458)
Kunwar Grover
llvmlistbot at llvm.org
Thu Jun 19 09:39:20 PDT 2025
================
@@ -886,9 +886,10 @@ def Vector_InsertOp :
AllTypesMatch<["dest", "result"]>]> {
let summary = "insert operation";
let description = [{
- Takes an n-D source vector, an (n+k)-D destination vector and a k-D position
- 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.
+ Inserts an n-D source vector (the value to store) into an (n + k)-D
+ destination vector at a specified k-D position. When n = 0, the source
+ degenerates to a scalar element inserted into the (0 + k)-D destination
+ vector.
----------------
Groverkss wrote:
It's a bit confusing when i read it together with vector.extract docs.
Can we do
n-D vector base vector (source for vector.extract, dest for vector.insert)
k-D position
(n-k)-D subvector, degenerates to scalar if k = n
it's a bit easier to follow then
https://github.com/llvm/llvm-project/pull/121458
More information about the Mlir-commits
mailing list