@@ -1819,17 +1819,17 @@ def Vector_MaskedLoadOp :
1819
1819
Vector_Op<"maskedload">,
1820
1820
Arguments<(ins Arg<AnyMemRef, "", [MemRead]>:$base,
1821
1821
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)> {
1825
1825
1826
1826
let summary = "loads elements from memory into a vector as defined by a mask vector";
1827
1827
1828
1828
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
1831
1831
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:
1833
1833
```
1834
1834
result[0] := if mask[0] then base[i + 0] else pass_thru[0]
1835
1835
result[1] := if mask[1] then base[i + 1] else pass_thru[1]
@@ -1882,14 +1882,14 @@ def Vector_MaskedStoreOp :
1882
1882
Vector_Op<"maskedstore">,
1883
1883
Arguments<(ins Arg<AnyMemRef, "", [MemWrite]>:$base,
1884
1884
Variadic<Index>:$indices,
1885
- VectorOfRankAndType<[1], [I1]>:$mask,
1886
- VectorOfRank<[1]> :$valueToStore)> {
1885
+ VectorOf< [I1]>:$mask,
1886
+ AnyVector :$valueToStore)> {
1887
1887
1888
1888
let summary = "stores elements from a vector into memory as defined by a mask vector";
1889
1889
1890
1890
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
1893
1893
set, the corresponding element from the vector is written to memory. Otherwise,
1894
1894
no action is taken for the element. Informally the semantics are:
1895
1895
```
@@ -2076,23 +2076,26 @@ def Vector_ExpandLoadOp :
2076
2076
Vector_Op<"expandload">,
2077
2077
Arguments<(ins Arg<AnyMemRef, "", [MemRead]>:$base,
2078
2078
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)> {
2082
2082
2083
2083
let summary = "reads elements from memory and spreads them into a vector as defined by a mask";
2084
2084
2085
2085
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
2088
- next element is read from memory. Otherwise, the corresponding element
2089
- is taken from a 1-D pass-through vector. Informally the semantics are:
2086
+ The expand load reads elements from memory into a vector as defined by a
2087
+ base with indices and a mask vector. Expansion only applies to the innermost
2088
+ dimension. When the mask is set, the next element is read from memory.
2089
+ Otherwise, the corresponding element is taken from a pass-through vector.
2090
+ Informally the semantics are:
2091
+
2090
2092
```
2091
2093
index = i
2092
2094
result[0] := if mask[0] then base[index++] else pass_thru[0]
2093
2095
result[1] := if mask[1] then base[index++] else pass_thru[1]
2094
2096
etc.
2095
2097
```
2098
+
2096
2099
Note that the index increment is done conditionally.
2097
2100
2098
2101
If a mask bit is set and the corresponding index is out-of-bounds for the
@@ -2140,22 +2143,25 @@ def Vector_CompressStoreOp :
2140
2143
Vector_Op<"compressstore">,
2141
2144
Arguments<(ins Arg<AnyMemRef, "", [MemWrite]>:$base,
2142
2145
Variadic<Index>:$indices,
2143
- VectorOfRankAndType<[1], [I1]>:$mask,
2144
- VectorOfRank<[1]> :$valueToStore)> {
2146
+ VectorOf< [I1]>:$mask,
2147
+ AnyVector :$valueToStore)> {
2145
2148
2146
2149
let summary = "writes elements selectively from a vector as defined by a mask";
2147
2150
2148
2151
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
2151
- set, the corresponding element from the vector is written next to memory.
2152
- Otherwise, no action is taken for the element. Informally the semantics are:
2152
+ The compress store operation writes elements from a vector into memory as
2153
+ defined by a base with indices and a mask vector. Compression only applies
2154
+ to the innermost dimension. When the mask is set, the corresponding element
2155
+ from the vector is written next to memory. Otherwise, no action is taken
2156
+ for the element. Informally the semantics are:
2157
+
2153
2158
```
2154
2159
index = i
2155
2160
if (mask[0]) base[index++] = value[0]
2156
2161
if (mask[1]) base[index++] = value[1]
2157
2162
etc.
2158
2163
```
2164
+
2159
2165
Note that the index increment is done conditionally.
2160
2166
2161
2167
If a mask bit is set and the corresponding index is out-of-bounds for the
0 commit comments