@@ -15,25 +15,25 @@ include "mlir/IR/EnumAttr.td"
15
15
// Atomic binary op enum attribute.
16
16
//===----------------------------------------------------------------------===//
17
17
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">;
35
35
36
- def AtomicBinOp : I64EnumAttr <
36
+ def AtomicBinOp : I32Enum <
37
37
"AtomicBinOp",
38
38
"ptr.atomicrmw binary operations",
39
39
[AtomicBinOpXchg, AtomicBinOpAdd, AtomicBinOpSub, AtomicBinOpAnd,
@@ -48,15 +48,15 @@ def AtomicBinOp : I64EnumAttr<
48
48
// Atomic ordering enum attribute.
49
49
//===----------------------------------------------------------------------===//
50
50
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">;
58
58
59
- def AtomicOrdering : I64EnumAttr <
59
+ def AtomicOrdering : I32Enum <
60
60
"AtomicOrdering",
61
61
"Atomic ordering for LLVM's memory model",
62
62
[AtomicOrderingNotAtomic, AtomicOrderingUnordered, AtomicOrderingMonotonic,
@@ -66,6 +66,8 @@ def AtomicOrdering : I64EnumAttr<
66
66
let cppNamespace = "::mlir::ptr";
67
67
}
68
68
69
+ def AtomicOrderingProp : EnumProp<AtomicOrdering>;
70
+
69
71
//===----------------------------------------------------------------------===//
70
72
// Ptr add flags enum properties.
71
73
//===----------------------------------------------------------------------===//
0 commit comments