[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / Transforms / Coroutines / coro-cleanup.ll
blobb6ff99822e6742cdc8e2fb5546903f358f82cc73
1 ; Make sure that all library helper coro intrinsics are lowered.
2 ; RUN: opt < %s -passes='default<O0>' -enable-coroutines -S | FileCheck %s
4 ; CHECK-LABEL: @uses_library_support_coro_intrinsics(
5 ; CHECK-NOT:     @llvm.coro
6 ; CHECK:         ret void
7 define void @uses_library_support_coro_intrinsics(i8* %hdl) {
8 entry:
9   call void @llvm.coro.resume(i8* %hdl)
10   call void @llvm.coro.destroy(i8* %hdl)
11   call i1 @llvm.coro.done(i8* %hdl)
12   ret void
15 declare void @llvm.coro.resume(i8*)
16 declare void @llvm.coro.destroy(i8*)
17 declare i1 @llvm.coro.done(i8*)