1
1
; RUN: opt < %s -enable-coroutines -passes='default<O2>' -S | FileCheck --check-prefixes=CHECK %s
2
-
2
+ ; RUN: opt < %s -enable-coroutines -O0 -S
3
3
target datalayout = "p:64:64:64"
4
4
5
5
%async.task = type { i64 }
@@ -212,11 +212,12 @@ entry:
212
212
store i8* %async.ctxt , i8** %callee_context.caller_context.addr
213
213
%resume_proj_fun = bitcast i8* (i8* )* @resume_context_projection to i8*
214
214
%callee = bitcast void (i8* , %async.task* , %async.actor* )* @asyncSuspend to i8*
215
+ %task.casted = bitcast i8* %arg0 to %async.task*
215
216
%res = call {i8* , i8* , i8* } (i32 , i8* , i8* , ...) @llvm.coro.suspend.async (i32 2 ,
216
217
i8* %resume.func_ptr ,
217
218
i8* %resume_proj_fun ,
218
219
void (i8* , i8* , %async.task* , %async.actor* )* @my_async_function.my_other_async_function_fp.apply ,
219
- i8* %callee , i8* %callee_context , %async.task* %task , %async.actor * %actor ), !dbg !9
220
+ i8* %callee , i8* %callee_context , %async.task* %task.casted , %async.actor * %actor ), !dbg !9
220
221
221
222
%continuation_task_arg = extractvalue {i8* , i8* , i8* } %res , 0
222
223
%task.2 = bitcast i8* %continuation_task_arg to %async.task*
@@ -234,7 +235,7 @@ entry:
234
235
i8* %resume.func_ptr.1 ,
235
236
i8* %resume_proj_fun.2 ,
236
237
void (i8* , i8* , %async.task* , %async.actor* )* @my_async_function.my_other_async_function_fp.apply ,
237
- i8* %callee.2 , i8* %callee_context , %async.task* %task , %async.actor * %actor )
238
+ i8* %callee.2 , i8* %callee_context , %async.task* %task.casted , %async.actor * %actor )
238
239
239
240
call void @llvm.coro.async.context.dealloc (i8* %callee_context )
240
241
%continuation_actor_arg = extractvalue {i8* , i8* , i8* } %res.2 , 1
@@ -542,6 +543,7 @@ declare swiftcc void @asyncReturn(i8*, %async.task*, %async.actor*)
542
543
declare swiftcc void @asyncSuspend (i8* , %async.task* , %async.actor* )
543
544
declare i8* @llvm.coro.async.resume ()
544
545
declare void @llvm.coro.async.size.replace (i8* , i8* )
546
+ declare i8* @hide (i8* )
545
547
546
548
!llvm.dbg.cu = !{!2 }
547
549
!llvm.module.flags = !{!0 }
0 commit comments