================
@@ -416,18 +420,26 @@ def CIR_LoadOp : CIR_Op<"load", [
     // Load address from memory at address %0. %3 is used by at least one
     // operation that dereferences a pointer.
     %3 = cir.load deref %0 : !cir.ptr<!cir.ptr<i32>>
+
+    // Perform a volatile load from address in %0.
+    %4 = cir.load volatile %0 : !cir.ptr<i32>, i32
+
+    // Others
+    %x = cir.load align(16) atomic(seq_cst) %0 : !cir.ptr<i32>, i32
     ```
   }];
 
   let arguments = (ins Arg<CIR_PointerType, "the address to load from",
                            [MemRead]>:$addr,
                        UnitAttr:$isDeref,
                        OptionalAttr<I64Attr>:$alignment,
+                       UnitAttr:$is_volatile,
----------------
xlauko wrote:

Can we keep the same order here as in assembly format? Also I think it is more 
convenient to pack unit attributes together:

```suggestion
                       UnitAttr:$isDeref,
                       UnitAttr:$is_volatile,
                       OptionalAttr<I64Attr>:$alignment,
```

https://github.com/llvm/llvm-project/pull/156124
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to