[clang] [CIR] Add cir.coro.intrinsic.promise Op (PR #221124)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 4 09:49:55 PDT 2026
================
@@ -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
More information about the cfe-commits
mailing list