================
@@ -4984,6 +4984,25 @@ def CIR_CoroSizeOp : CIR_CoroIntrinsicOp<"size", (ins),
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// Coroutine intrinsic PromiseOp
+//===----------------------------------------------------------------------===//
+
+def CIR_CoroPromiseOp : CIR_CoroIntrinsicOp<"promise",
+    (ins CIR_VoidPtrType:$coroframe, CIR_AnyIntType:$align, 
CIR_BoolType:$from),
+    (outs CIR_VoidPtrType:$result)> {
+  let summary = "Represents llvm.coro.promise";
+  let description = [{
+    Given a coroutine handle (if `from` is false) or a pointer to a coroutine
+    promise (if `from` is true), obtains a pointer to the coroutine promise or
----------------
andykaylor wrote:

The is the exact behavior and name as the corresponding LLVM intrinisc. We're 
stuck with the behavior unless we want to introduce two different CIR 
operations that lower to variants of the same LLVM operation (which wouldn't be 
bad), but we could definitely improve the name.

https://github.com/llvm/llvm-project/pull/221124
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to