@@ -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//===----------------------------------------------------------------------===//
@@ -790,4 +800,23 @@ def DXSA_DclHsMaxTessFactor : DXSA_Op<"dcl_hs_max_tessfactor"> {
790800 let hasVerifier = 1;
791801}
792802
803+ def DXSA_DclHsJoinPhaseInstanceCount :
804+ DXSA_Op<"dcl_hs_join_phase_instance_count"> {
805+ let summary = "declares the Join Phase instance count";
806+ let description = [{
807+ The `dxsa.dcl_hs_join_phase_instance_count` operation declares
808+ the Join Phase instance count.
809+
810+ The `$count` must be a positive 32-bit unsigned integer in the range [1, 2^32 - 1].
811+
812+ Example:
813+
814+ ```mlir
815+ dxsa.dcl_hs_join_phase_instance_count 42
816+ ```
817+ }];
818+ let arguments = (ins ConfinedAttr<UI32Attr, [DXSA_UIntNonZero]>:$count);
819+ let assemblyFormat = "$count attr-dict";
820+ }
821+
793822#endif // DXSA_OPS
0 commit comments