[Mlir-commits] [mlir] [mlir][llvm] Add operations for coroutine intrinsics (PR #214099)
Tobias Gysi
llvmlistbot at llvm.org
Wed Aug 5 04:10:52 PDT 2026
================
@@ -842,6 +842,16 @@ llvm.func @coro_begin(%arg0: !llvm.ptr) {
llvm.return
}
+// CHECK-LABEL: @coro_alloc
+llvm.func @coro_alloc() {
+ %zero = llvm.mlir.constant(0 : i32) : i32
+ %null = llvm.mlir.zero : !llvm.ptr
+ %token = llvm.intr.coro.id %zero, %null, %null, %null : (i32, !llvm.ptr, !llvm.ptr, !llvm.ptr) -> token
+ // CHECK: call i1 @llvm.coro.alloc
+ %0 = llvm.intr.coro.alloc %token : (token) -> i1
----------------
gysit wrote:
nit: can you match the token argument and where it is coming from.
https://github.com/llvm/llvm-project/pull/214099
More information about the Mlir-commits
mailing list