[Mlir-commits] [mlir] [mlir][ArmSME] Add optional padding and mask operands to tile_load (PR #69195)

Diego Caballero llvmlistbot at llvm.org
Mon Oct 16 10:41:12 PDT 2023


================
@@ -231,7 +231,24 @@ def ZeroOp : ArmSME_Op<"zero", [Pure]> {
   let assemblyFormat = "attr-dict `:` type($res)";
 }
 
-def TileLoadOp : ArmSME_Op<"tile_load"> {
+def TileLoadOp : ArmSME_Op<"tile_load", [
+  AttrSizedOperandSegments,
+  TypesMatchWith<
+    "padding type matches element type of result (if present)",
+    "result", "padding",
+    "::llvm::cast<VectorType>($_self).getElementType()",
+    "!getPadding() || std::equal_to<>()"
+  >,
+  TypesMatchWith<
+    "mask has i1 element type and same shape as result (if present)",
+    "result", "mask",
+    "VectorType("
+      "VectorType::Builder("
+        "::llvm::cast<mlir::VectorType>($_self)"
+      ").setElementType(IntegerType::get($_self.getContext(), 1)))",
----------------
dcaballe wrote:

any chances you can check this without building a new type?

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


More information about the Mlir-commits mailing list