[Mlir-commits] [mlir] [mlir][llvm] Add operations for coroutine intrinsics (PR #214099)

Tobias Gysi llvmlistbot at llvm.org
Wed Aug 5 04:10:51 PDT 2026


================
@@ -818,6 +818,15 @@ define void @coro_begin(ptr %0) {
   ret void
 }
 
+; CHECK-LABEL:  llvm.func @coro_alloc
+define void @coro_alloc() {
+  ; CHECK: llvm.intr.coro.id %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}} : (i32, !llvm.ptr, !llvm.ptr, !llvm.ptr) -> token
+  %id = call token @llvm.coro.id(i32 0, ptr null, ptr null, ptr null)
+  ; CHECK: llvm.intr.coro.alloc %{{.*}} : (token) -> i1
----------------
gysit wrote:

nit: can you extend the check lines to match at least the result of coro.id and how it is passed to coro.alloc. I think in general the AI coders tend to reduce the check lines too much. It would be nice if the tests would match operands of the intrinsics so that reviewer can see if things are correctly wired.

https://github.com/llvm/llvm-project/pull/214099


More information about the Mlir-commits mailing list