@@ -281,6 +281,16 @@ def DXSA_ComponentMaskAttr :
281281 let assemblyFormat = "`<` $value `>`";
282282}
283283
284+ //===----------------------------------------------------------------------===//
285+ // DXSA attribute Constraints
286+ //===----------------------------------------------------------------------===//
287+
288+ // This constraint does not treat the most significant bit as a sign bit,
289+ // so it is safe to use on unsigned integer attributes.
290+ def DXSA_UIntNonZero : AttrConstraint<
291+ CPred<"!::llvm::cast<::mlir::IntegerAttr>($_self).getValue().isZero()">,
292+ "whose value is non-zero">;
293+
284294//===----------------------------------------------------------------------===//
285295// DXSA op definitions
286296//===----------------------------------------------------------------------===//
@@ -719,4 +729,23 @@ def DXSA_DclOutput : DXSA_Op<"dcl_output"> {
719729 let assemblyFormat = "$operand attr-dict";
720730}
721731
732+ def DXSA_DclHsJoinPhaseInstanceCount :
733+ DXSA_Op<"dcl_hs_join_phase_instance_count"> {
734+ let summary = "declares the Join Phase instance count";
735+ let description = [{
736+ The `dxsa.dcl_hs_join_phase_instance_count` operation declares
737+ the Join Phase instance count.
738+
739+ The `$count` must be a positive 32-bit unsigned integer in the range [1, 2^32 - 1].
740+
741+ Example:
742+
743+ ```mlir
744+ dxsa.dcl_hs_join_phase_instance_count 42
745+ ```
746+ }];
747+ let arguments = (ins ConfinedAttr<UI32Attr, [DXSA_UIntNonZero]>:$count);
748+ let assemblyFormat = "$count attr-dict";
749+ }
750+
722751#endif // DXSA_OPS
0 commit comments