[Mlir-commits] [mlir] [mlir][vector] Combine the operation mask in -lower-vector-mask (PR #226128)
Samarth Narang
llvmlistbot at llvm.org
Sat Sep 26 18:27:51 PDT 2026
snarang181 wrote:
> IMO, we shouldn't allow two masks, it should either one or the other. @dcaballe , are we missing anything here?
Thanks for your review, @banach-space. What motivated the intersection of the masks in this PR was https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp#L1454 where `MaterializeTransferMask` ANDs its in-bounds mask with a transfer's own mask. This would keep today's IR legal.
IIUC, the option you are proposing is disallowing the inner mask via the verifier? However, what about `vector.gather`, which by definition needs a mask operand. To enable that, we would have to forbid wrapping the `gather` op in the vector mask operation but I think the linalg vectorizer already emits those in prod.
Any thoughts on this?
https://github.com/llvm/llvm-project/pull/226128
More information about the Mlir-commits
mailing list