1 ; Make sure that all library helper coro intrinsics are lowered.
2 ; RUN: opt < %s -passes=coro-cleanup -S | FileCheck %s
4 ; CHECK-LABEL: @uses_library_support_coro_intrinsics(
5 ; CHECK-NOT: @llvm.coro
8 define void @uses_library_support_coro_intrinsics(ptr %hdl) {
10 %0 = call ptr @llvm.coro.subfn.addr(ptr %hdl, i8 0)
11 call fastcc void %0(ptr %hdl)
12 %1 = call ptr @llvm.coro.subfn.addr(ptr %hdl, i8 1)
13 call fastcc void %1(ptr %hdl)
14 %2 = load ptr, ptr %hdl
15 %3 = icmp eq ptr %2, null
18 declare void @llvm.coro.resume(ptr)
19 declare void @llvm.coro.destroy(ptr)
20 ; Function Attrs: argmemonly nounwind
21 declare i1 @llvm.coro.done(ptr nocapture readonly) #0
22 ; Function Attrs: argmemonly nounwind readonly
23 declare ptr @llvm.coro.subfn.addr(ptr nocapture readonly, i8) #1
25 attributes #0 = { argmemonly nounwind }
26 attributes #1 = { argmemonly nounwind readonly }