@@ -15,25 +15,25 @@ include "mlir/IR/EnumAttr.td"
1515// Atomic binary op enum attribute.
1616//===----------------------------------------------------------------------===//
1717
18- def AtomicBinOpXchg : I64EnumAttrCase <"xchg", 0, "xchg">;
19- def AtomicBinOpAdd : I64EnumAttrCase <"add", 1, "add">;
20- def AtomicBinOpSub : I64EnumAttrCase <"sub", 2, "sub">;
21- def AtomicBinOpAnd : I64EnumAttrCase <"_and", 3, "_and">;
22- def AtomicBinOpNand : I64EnumAttrCase <"nand", 4, "nand">;
23- def AtomicBinOpOr : I64EnumAttrCase <"_or", 5, "_or">;
24- def AtomicBinOpXor : I64EnumAttrCase <"_xor", 6, "_xor">;
25- def AtomicBinOpMax : I64EnumAttrCase <"max", 7, "max">;
26- def AtomicBinOpMin : I64EnumAttrCase <"min", 8, "min">;
27- def AtomicBinOpUMax : I64EnumAttrCase <"umax", 9, "umax">;
28- def AtomicBinOpUMin : I64EnumAttrCase <"umin", 10, "umin">;
29- def AtomicBinOpFAdd : I64EnumAttrCase <"fadd", 11, "fadd">;
30- def AtomicBinOpFSub : I64EnumAttrCase <"fsub", 12, "fsub">;
31- def AtomicBinOpFMax : I64EnumAttrCase <"fmax", 13, "fmax">;
32- def AtomicBinOpFMin : I64EnumAttrCase <"fmin", 14, "fmin">;
33- def AtomicBinOpUIncWrap : I64EnumAttrCase <"uinc_wrap", 15, "uinc_wrap">;
34- def AtomicBinOpUDecWrap : I64EnumAttrCase <"udec_wrap", 16, "udec_wrap">;
18+ def AtomicBinOpXchg : I32EnumCase <"xchg", 0, "xchg">;
19+ def AtomicBinOpAdd : I32EnumCase <"add", 1, "add">;
20+ def AtomicBinOpSub : I32EnumCase <"sub", 2, "sub">;
21+ def AtomicBinOpAnd : I32EnumCase <"_and", 3, "_and">;
22+ def AtomicBinOpNand : I32EnumCase <"nand", 4, "nand">;
23+ def AtomicBinOpOr : I32EnumCase <"_or", 5, "_or">;
24+ def AtomicBinOpXor : I32EnumCase <"_xor", 6, "_xor">;
25+ def AtomicBinOpMax : I32EnumCase <"max", 7, "max">;
26+ def AtomicBinOpMin : I32EnumCase <"min", 8, "min">;
27+ def AtomicBinOpUMax : I32EnumCase <"umax", 9, "umax">;
28+ def AtomicBinOpUMin : I32EnumCase <"umin", 10, "umin">;
29+ def AtomicBinOpFAdd : I32EnumCase <"fadd", 11, "fadd">;
30+ def AtomicBinOpFSub : I32EnumCase <"fsub", 12, "fsub">;
31+ def AtomicBinOpFMax : I32EnumCase <"fmax", 13, "fmax">;
32+ def AtomicBinOpFMin : I32EnumCase <"fmin", 14, "fmin">;
33+ def AtomicBinOpUIncWrap : I32EnumCase <"uinc_wrap", 15, "uinc_wrap">;
34+ def AtomicBinOpUDecWrap : I32EnumCase <"udec_wrap", 16, "udec_wrap">;
3535
36- def AtomicBinOp : I64EnumAttr <
36+ def AtomicBinOp : I32Enum <
3737 "AtomicBinOp",
3838 "ptr.atomicrmw binary operations",
3939 [AtomicBinOpXchg, AtomicBinOpAdd, AtomicBinOpSub, AtomicBinOpAnd,
@@ -48,15 +48,15 @@ def AtomicBinOp : I64EnumAttr<
4848// Atomic ordering enum attribute.
4949//===----------------------------------------------------------------------===//
5050
51- def AtomicOrderingNotAtomic : I64EnumAttrCase <"not_atomic", 0, "not_atomic">;
52- def AtomicOrderingUnordered : I64EnumAttrCase <"unordered", 1, "unordered">;
53- def AtomicOrderingMonotonic : I64EnumAttrCase <"monotonic", 2, "monotonic">;
54- def AtomicOrderingAcquire : I64EnumAttrCase <"acquire", 3, "acquire">;
55- def AtomicOrderingRelease : I64EnumAttrCase <"release", 4, "release">;
56- def AtomicOrderingAcqRel : I64EnumAttrCase <"acq_rel", 5, "acq_rel">;
57- def AtomicOrderingSeqCst : I64EnumAttrCase <"seq_cst", 6, "seq_cst">;
51+ def AtomicOrderingNotAtomic : I32EnumCase <"not_atomic", 0, "not_atomic">;
52+ def AtomicOrderingUnordered : I32EnumCase <"unordered", 1, "unordered">;
53+ def AtomicOrderingMonotonic : I32EnumCase <"monotonic", 2, "monotonic">;
54+ def AtomicOrderingAcquire : I32EnumCase <"acquire", 3, "acquire">;
55+ def AtomicOrderingRelease : I32EnumCase <"release", 4, "release">;
56+ def AtomicOrderingAcqRel : I32EnumCase <"acq_rel", 5, "acq_rel">;
57+ def AtomicOrderingSeqCst : I32EnumCase <"seq_cst", 6, "seq_cst">;
5858
59- def AtomicOrdering : I64EnumAttr <
59+ def AtomicOrdering : I32Enum <
6060 "AtomicOrdering",
6161 "Atomic ordering for LLVM's memory model",
6262 [AtomicOrderingNotAtomic, AtomicOrderingUnordered, AtomicOrderingMonotonic,
@@ -66,6 +66,8 @@ def AtomicOrdering : I64EnumAttr<
6666 let cppNamespace = "::mlir::ptr";
6767}
6868
69+ def AtomicOrderingProp : EnumProp<AtomicOrdering>;
70+
6971//===----------------------------------------------------------------------===//
7072// Ptr add flags enum properties.
7173//===----------------------------------------------------------------------===//
0 commit comments