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

Benjamin Maxwell llvmlistbot at llvm.org
Wed Oct 25 03:30:29 PDT 2023


================
@@ -242,6 +259,16 @@ def TileLoadOp : ArmSME_Op<"tile_load"> {
     dimensions, since the operation is scalable, and the element type must be a
     scalar that matches the element type of the result.
 
+    An optional SSA value `padding` of the same elemental type as the MemRef is
+    provided to specify a fallback value in the case of masking.
+
+    An optional SSA value `mask` may be specified to mask out elements read
+    from the MemRef. The `mask` type is an `i1` vector with a shape that
+    matches how elements are read from the MemRef. Elements whose corresponding
+    mask element is `0` are masked out and replaced with `padding`.
+
+    If either `padding` or `mask` are specified, both must be specified.
----------------
MacDue wrote:

This is enforced by the syntax (with only allows specifying both or neither). You could also verify this constraint with: 
```
    PredOpTrait<
      "both `lhsMask` and `rhsMask` should be provided or neither",
      CPred<"bool(getPadding()) == bool(getMask())">>,
```

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


More information about the Mlir-commits mailing list