Skip to content

Commit 6084db5

Browse files
committed
[mlir][vector] Remove unneeded restrictions
These were created when the only mapping was to LLVM, rather than some intrinsic property of the op.
1 parent 3336352 commit 6084db5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,17 +1819,17 @@ def Vector_MaskedLoadOp :
18191819
Vector_Op<"maskedload">,
18201820
Arguments<(ins Arg<AnyMemRef, "", [MemRead]>:$base,
18211821
Variadic<Index>:$indices,
1822-
VectorOfRankAndType<[1], [I1]>:$mask,
1823-
VectorOfRank<[1]>:$pass_thru)>,
1824-
Results<(outs VectorOfRank<[1]>:$result)> {
1822+
VectorOf<[I1]>:$mask,
1823+
AnyVector:$pass_thru)>,
1824+
Results<(outs AnyVector:$result)> {
18251825

18261826
let summary = "loads elements from memory into a vector as defined by a mask vector";
18271827

18281828
let description = [{
1829-
The masked load reads elements from memory into a 1-D vector as defined
1830-
by a base with indices and a 1-D mask vector. When the mask is set, the
1829+
The masked load reads elements from memory into a vector as defined
1830+
by a base with indices and a mask vector. When the mask is set, the
18311831
element is read from memory. Otherwise, the corresponding element is taken
1832-
from a 1-D pass-through vector. Informally the semantics are:
1832+
from a pass-through vector. Informally the semantics are:
18331833
```
18341834
result[0] := if mask[0] then base[i + 0] else pass_thru[0]
18351835
result[1] := if mask[1] then base[i + 1] else pass_thru[1]
@@ -1882,14 +1882,14 @@ def Vector_MaskedStoreOp :
18821882
Vector_Op<"maskedstore">,
18831883
Arguments<(ins Arg<AnyMemRef, "", [MemWrite]>:$base,
18841884
Variadic<Index>:$indices,
1885-
VectorOfRankAndType<[1], [I1]>:$mask,
1886-
VectorOfRank<[1]>:$valueToStore)> {
1885+
VectorOf<[I1]>:$mask,
1886+
AnyVector:$valueToStore)> {
18871887

18881888
let summary = "stores elements from a vector into memory as defined by a mask vector";
18891889

18901890
let description = [{
1891-
The masked store operation writes elements from a 1-D vector into memory
1892-
as defined by a base with indices and a 1-D mask vector. When the mask is
1891+
The masked store operation writes elements from a vector into memory
1892+
as defined by a base with indices and a mask vector. When the mask is
18931893
set, the corresponding element from the vector is written to memory. Otherwise,
18941894
no action is taken for the element. Informally the semantics are:
18951895
```
@@ -2076,17 +2076,17 @@ def Vector_ExpandLoadOp :
20762076
Vector_Op<"expandload">,
20772077
Arguments<(ins Arg<AnyMemRef, "", [MemRead]>:$base,
20782078
Variadic<Index>:$indices,
2079-
VectorOfRankAndType<[1], [I1]>:$mask,
2080-
VectorOfRank<[1]>:$pass_thru)>,
2081-
Results<(outs VectorOfRank<[1]>:$result)> {
2079+
VectorOf<[I1]>:$mask,
2080+
AnyVector:$pass_thru)>,
2081+
Results<(outs AnyVector:$result)> {
20822082

20832083
let summary = "reads elements from memory and spreads them into a vector as defined by a mask";
20842084

20852085
let description = [{
2086-
The expand load reads elements from memory into a 1-D vector as defined
2087-
by a base with indices and a 1-D mask vector. When the mask is set, the
2086+
The expand load reads elements from memory into a vector as defined
2087+
by a base with indices and a mask vector. When the mask is set, the
20882088
next element is read from memory. Otherwise, the corresponding element
2089-
is taken from a 1-D pass-through vector. Informally the semantics are:
2089+
is taken from a pass-through vector. Informally the semantics are:
20902090
```
20912091
index = i
20922092
result[0] := if mask[0] then base[index++] else pass_thru[0]
@@ -2140,14 +2140,14 @@ def Vector_CompressStoreOp :
21402140
Vector_Op<"compressstore">,
21412141
Arguments<(ins Arg<AnyMemRef, "", [MemWrite]>:$base,
21422142
Variadic<Index>:$indices,
2143-
VectorOfRankAndType<[1], [I1]>:$mask,
2144-
VectorOfRank<[1]>:$valueToStore)> {
2143+
VectorOf<[I1]>:$mask,
2144+
AnyVector:$valueToStore)> {
21452145

21462146
let summary = "writes elements selectively from a vector as defined by a mask";
21472147

21482148
let description = [{
2149-
The compress store operation writes elements from a 1-D vector into memory
2150-
as defined by a base with indices and a 1-D mask vector. When the mask is
2149+
The compress store operation writes elements from a vector into memory
2150+
as defined by a base with indices and a mask vector. When the mask is
21512151
set, the corresponding element from the vector is written next to memory.
21522152
Otherwise, no action is taken for the element. Informally the semantics are:
21532153
```

0 commit comments

Comments
 (0)