[Mlir-commits] [mlir] [mlir][Vector] Improve `vector.mask` verifier (PR #139823)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed May 14 08:02:48 PDT 2025
================
@@ -1747,6 +1747,34 @@ func.func @vector_mask_0d_mask(%arg0: tensor<2x4xi32>,
// -----
+func.func @vector_mask_non_empty_external_return(%t0: tensor<?xf32>, %idx: index,
+ %m0: vector<16xi1>, %ext: vector<16xf32>) -> vector<16xf32> {
+ %ft0 = arith.constant 0.0 : f32
+ // expected-error at +1 {{'vector.mask' op expects all the results from the MaskableOpInterface to be returned by the terminator}}
+ %0 = vector.mask %m0 {
+ %1 =vector.transfer_read %t0[%idx], %ft0 : tensor<?xf32>, vector<16xf32>
+ vector.yield %ext : vector<16xf32>
+ } : vector<16xi1> -> vector<16xf32>
+
+ return %0 : vector<16xf32>
+}
+
+// -----
+
+func.func @vector_mask_non_empty_mixed_return(%t0: tensor<?xf32>, %idx: index,
+ %m0: vector<16xi1>, %ext: vector<16xf32>) -> (vector<16xf32>, vector<16xf32>) {
+ %ft0 = arith.constant 0.0 : f32
+ // expected-error at +1 {{'vector.mask' op expects number of results to match maskable operation number of results}}
----------------
banach-space wrote:
This fails today with this error:
```
error: 'vector.mask' op expects number of results to match mask region yielded values
```
Its not clear to me what generates this new error.
https://github.com/llvm/llvm-project/pull/139823
More information about the Mlir-commits
mailing list