[Mlir-commits] [mlir] [mlir][vector] Add folders for full constant transfer masks (PR #71676)

Quinn Dawkins llvmlistbot at llvm.org
Fri Nov 10 17:55:10 PST 2023


================
@@ -5601,6 +5622,22 @@ LogicalResult ConstantMaskOp::verify() {
   return success();
 }
 
+bool ConstantMaskOp::isFullMask() {
+  auto resultType = getVectorType();
----------------
qedawkins wrote:

Oh nice, although I don't think this would be something we should run as a folder, given that it might iterate over the elements of an `arith.constant` op. What about extracting out the constant mask (and maybe create_mask) handling alone and using it for the folder? Or we could add a canonicalization pattern instead.

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


More information about the Mlir-commits mailing list