Skip to content

Commit f1cf692

Browse files
committed
Rebase and de-duplicate HasMatchingMaskTypeConstraint
1 parent 27b129f commit f1cf692

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -615,12 +615,6 @@ def MoveTileSliceToVectorOp : ArmSME_Op<"move_tile_slice_to_vector", [Pure,
615615
}];
616616
}
617617

618-
class HasMatchingMaskTypeConstraint<string operand> :
619-
OptionalTypesMatchWith<
620-
"shape of `" # operand # "Mask` matches `" # operand # "`",
621-
operand, operand # "Mask",
622-
"::llvm::cast<mlir::VectorType>($_self).cloneWith({}, IntegerType::get($_ctxt, 1))">;
623-
624618
class OuterProductResultTileTypeConstraint<string operand> :
625619
OptionalTypesMatchWith<operand # "type is derived from `lhs` and `rhs`",
626620
"lhs", operand,
@@ -635,8 +629,8 @@ def OuterProductOp :
635629
ArmSME_Op<"outerproduct", [Pure,
636630
AttrSizedOperandSegments,
637631
AllTypesMatch<["lhs", "rhs"]>,
638-
HasMatchingMaskTypeConstraint<"lhs">,
639-
HasMatchingMaskTypeConstraint<"rhs">,
632+
HasMatchingMaskTypeConstraint<"lhs", "lhsMask">,
633+
HasMatchingMaskTypeConstraint<"rhs", "rhsMask">,
640634
PredOpTrait<
641635
"both `lhsMask` and `rhsMask` should be provided or neither",
642636
CPred<"bool(getLhsMask()) == bool(getRhsMask())">>,

0 commit comments

Comments
 (0)