[Mlir-commits] [mlir] [mlir][Vector] Improve `vector.mask` verifier (PR #139823)

Diego Caballero llvmlistbot at llvm.org
Fri May 16 15:53:50 PDT 2025


================
@@ -2482,8 +2482,12 @@ def Vector_MaskOp : Vector_Op<"mask", [
     masked. Values used within the region are captured from above. Only one
     *maskable* operation can be masked with a `vector.mask` operation at a time.
     An operation is *maskable* if it implements the `MaskableOpInterface`. The
-    terminator yields all results of the maskable operation to the result of
-    this operation.
+    terminator yields all results from the maskable operation to the result of
+    this operation. No other values are allowed to be yielded.
+
+    An empty `vector.mask` operation is legal to facilitate optimizations across
+    the `vector.mask` operation. However, it is considered a no-op regardless of
+    its returned values and will be removed by the canonicalizer.
----------------
dcaballe wrote:

That makes sense from a correctness perspective. Let me add that canonicalization separately

https://github.com/llvm/llvm-project/pull/139823


More information about the Mlir-commits mailing list