================
@@ -452,24 +464,32 @@ def CIR_StoreOp : CIR_Op<"store", [
a volatile store. Store's can be marked atomic by using
`atomic(<mem_order>)`.
- `align` can be used to specify an alignment that's different from the
+ `alignment` can be used to specify an alignment that's different from the
default, which is computed from `result`'s type ABI data layout.
Example:
```mlir
// Store a function argument to local storage, address in %0.
cir.store %arg0, %0 : i32, !cir.ptr<i32>
+
+ // Perform a volatile store into memory location at the address in %0.
+ cir.store volatile %arg0, %0 : i32, !cir.ptr<i32>
+
+ // Others
+ cir.store align(16) atomic(seq_cst) %x, %addr : i32, !cir.ptr<i32>
```
}];
let arguments = (ins CIR_AnyType:$value,
Arg<CIR_PointerType, "the address to store the value",
[MemWrite]>:$addr,
OptionalAttr<I64Attr>:$alignment,
+ UnitAttr:$is_volatile,
OptionalAttr<CIR_MemOrder>:$mem_order);
----------------
xlauko wrote:
same reordering here:
```suggestion
UnitAttr:$is_volatile,
OptionalAttr<I64Attr>:$alignment,
OptionalAttr<CIR_MemOrder>:$mem_order);
```
https://github.com/llvm/llvm-project/pull/156124
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits