1 ; RUN: opt < %s -passes='default<O0>' -S | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.12.0"
8 define internal {ptr, i32} @f(ptr %buffer, ptr %array) {
10 %id = call token @llvm.coro.id.retcon.once(i32 8, i32 8, ptr %buffer, ptr @prototype, ptr @allocate, ptr @deallocate)
11 %hdl = call ptr @llvm.coro.begin(token %id, ptr null)
12 %load = load i32, ptr %array
13 %load.pos = icmp sgt i32 %load, 0
14 br i1 %load.pos, label %pos, label %neg
17 %unwind0 = call i1 (...) @llvm.coro.suspend.retcon.i1(i32 %load)
18 br i1 %unwind0, label %cleanup, label %pos.cont
21 store i32 0, ptr %array, align 4
25 %unwind1 = call i1 (...) @llvm.coro.suspend.retcon.i1(i32 0)
26 br i1 %unwind1, label %cleanup, label %neg.cont
29 store i32 10, ptr %array, align 4
33 call i1 @llvm.coro.end(ptr %hdl, i1 0, token none)
37 declare token @llvm.coro.id.retcon.once(i32, i32, ptr, ptr, ptr, ptr)
38 declare ptr @llvm.coro.begin(token, ptr)
39 declare i1 @llvm.coro.suspend.retcon.i1(...)
40 declare i1 @llvm.coro.end(ptr, i1, token)
41 declare ptr @llvm.coro.prepare.retcon(ptr)
43 declare void @prototype(ptr, i1 zeroext)
45 declare noalias ptr @allocate(i32 %size)
46 declare void @deallocate(ptr %ptr)