================
@@ -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,
----------------
andykaylor wrote:

The ordering here matched the order of these elements in the LLVM dialect, but 
it doesn't match the order of the parameters in our createLoad and createStore 
functions. Your suggested reordering would match those parameters (which I 
think are consistent with OGCG), so I'll proceed with the suggestion.

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