@@ -33,7 +33,7 @@ bb0(%0 : @guaranteed $Builtin.NativeObject):
33
33
sil hidden [ossa] @launch_future : $@convention(method) <T> (Int, @owned @Sendable @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error Error) for <T>) -> () {
34
34
bb0(%flags : $Int, %taskFunction: @owned $@Sendable @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error Error) for <T>):
35
35
// CHECK-NOT: br i1
36
- // CHECK: [[NEW_TASK_AND_CONTEXT:%.*]] = call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %0, [[INT]] 0 , ptr %T, ptr %1, ptr %2)
36
+ // CHECK: [[NEW_TASK_AND_CONTEXT:%.*]] = call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %0, ptr null , ptr %T, ptr %1, ptr %2)
37
37
%optSerialExecutor = enum $Optional<Builtin.Executor>, #Optional.none
38
38
%optTaskGroup = enum $Optional<Builtin.RawPointer>, #Optional.none
39
39
%optTaskExecutor = enum $Optional<Builtin.Executor>, #Optional.none
@@ -52,14 +52,13 @@ bb0(%flags : $Int, %serialExecutor : $Builtin.Executor, %taskFunction: @owned $@
52
52
// CHECK: [[FLAGS_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 0
53
53
// CHECK: store [[INT]] 0, ptr [[FLAGS_GEP]], align
54
54
// CHECK: [[PARENT_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 1
55
- // CHECK: store [[INT]] 0 , ptr [[PARENT_GEP]], align
55
+ // CHECK: store ptr null , ptr [[PARENT_GEP]], align
56
56
// CHECK: [[EXECUTOR_GEP:%.*]] = getelementptr inbounds %swift.serial_executor_task_option, ptr [[EXECUTOR_RECORD]], i32 0, i32 1
57
57
// CHECK: [[EXECUTOR_IDENT_GEP:%.*]] = getelementptr inbounds %swift.executor, ptr [[EXECUTOR_GEP]], i32 0, i32 0
58
58
// CHECK: store [[INT]] %1, ptr [[EXECUTOR_IDENT_GEP]], align
59
59
// CHECK: [[EXECUTOR_IMPL_GEP:%.*]] = getelementptr inbounds %swift.executor, ptr [[EXECUTOR_GEP]], i32 0, i32 1
60
60
// CHECK: store [[INT]] %2, ptr [[EXECUTOR_IMPL_GEP]], align
61
- // CHECK: [[OPTIONS_PTR:%.*]] = ptrtoint ptr [[EXECUTOR_RECORD]] to [[INT]]
62
- // CHECK: [[NEW_TASK_AND_CONTEXT:%.*]] = call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %0, [[INT]] [[OPTIONS_PTR]], ptr %T, ptr %3, ptr %4)
61
+ // CHECK: [[NEW_TASK_AND_CONTEXT:%.*]] = call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %0, ptr [[EXECUTOR_RECORD]], ptr %T, ptr %3, ptr %4)
63
62
%optSerialExecutor = enum $Optional<Builtin.Executor>, #Optional.some, %serialExecutor : $Builtin.Executor
64
63
%optTaskGroup = enum $Optional<Builtin.RawPointer>, #Optional.none
65
64
%optTaskExecutor = enum $Optional<Builtin.Executor>, #Optional.none
@@ -76,11 +75,10 @@ bb0(%flags : $Int, %serialExecutor : $Builtin.Executor, %taskFunction: @owned $@
76
75
// CHECK: [[FLAGS_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 0
77
76
// CHECK: store [[INT]] 1, ptr [[FLAGS_GEP]], align
78
77
// CHECK: [[PARENT_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 1
79
- // CHECK: store [[INT]] 0 , ptr [[PARENT_GEP]], align
78
+ // CHECK: store ptr null , ptr [[PARENT_GEP]], align
80
79
// CHECK: [[GROUP_GEP:%.*]] = getelementptr inbounds %swift.task_group_task_option, ptr [[OPTIONS]], i32 0, i32 1
81
80
// CHECK: store ptr %0, ptr [[GROUP_GEP]], align
82
- // CHECK: [[OPTIONS_PTR:%.*]] = ptrtoint ptr [[OPTIONS]] to [[INT]]
83
- // CHECK: call swiftcc %swift.async_task_and_context @swift_task_create([[INT]] %3, [[INT]] [[OPTIONS_PTR]],
81
+ // CHECK: call swiftcc %swift.async_task_and_context @swift_task_create([[INT]] %3, ptr [[OPTIONS]],
84
82
sil hidden @launch_future_in_group : $@convention(thin) (Builtin.RawPointer, @owned @Sendable @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error Error) for <Int>, Int) -> () {
85
83
bb0(%taskGroup : $Builtin.RawPointer, %taskFunction : $@Sendable @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error Error) for <Int>, %flags: $Int):
86
84
%optSerialExecutor = enum $Optional<Builtin.Executor>, #Optional.none
@@ -105,13 +103,12 @@ bb0(%flags : $Int, %optTaskGroup : $Optional<Builtin.RawPointer>, %taskFunction:
105
103
// CHECK: [[FLAGS_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 0
106
104
// CHECK: store [[INT]] 1, ptr [[FLAGS_GEP]], align
107
105
// CHECK: [[PARENT_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 1
108
- // CHECK: store [[INT]] 0 , ptr [[PARENT_GEP]], align
106
+ // CHECK: store ptr null , ptr [[PARENT_GEP]], align
109
107
// CHECK: [[GROUP_GEP:%.*]] = getelementptr inbounds %swift.task_group_task_option, ptr [[OPTIONS]], i32 0, i32 1
110
108
// CHECK: store ptr [[GROUP]], ptr [[GROUP_GEP]], align
111
- // CHECK: [[OPTIONS_PTR:%.*]] = ptrtoint ptr [[OPTIONS]] to [[INT]]
112
109
// CHECK: br label %task_group.cont
113
110
// CHECK: task_group.cont:
114
- // CHECK: phi [[INT]] [ 0 , %entry ], [ [[OPTIONS_PTR ]], %task_group.some ]
111
+ // CHECK: phi ptr [ null , %entry ], [ [[OPTIONS ]], %task_group.some ]
115
112
// CHECK: [[NEW_TASK_AND_CONTEXT:%.*]] = call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create(
116
113
117
114
%optSerialExecutor = enum $Optional<Builtin.Executor>, #Optional.none
@@ -151,24 +148,22 @@ bb0(%taskGroup : $Builtin.RawPointer, %taskExecutor : $Builtin.Executor, %taskFu
151
148
// CHECK: [[FLAGS_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 0
152
149
// CHECK: store [[INT]] 1, ptr [[FLAGS_GEP]], align
153
150
// CHECK: [[PARENT_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 1
154
- // CHECK: store [[INT]] 0 , ptr [[PARENT_GEP]], align
151
+ // CHECK: store ptr null , ptr [[PARENT_GEP]], align
155
152
// CHECK: [[GROUP_GEP:%.*]] = getelementptr inbounds %swift.task_group_task_option, ptr [[GROUP_RECORD]], i32 0, i32 1
156
153
// CHECK: store ptr %0, ptr [[GROUP_GEP]], align
157
- // CHECK: [[OPTIONS_PTR:%.*]] = ptrtoint ptr [[GROUP_RECORD]] to [[INT]]
158
154
159
155
// CHECK: [[BASE_GEP:%.*]] = getelementptr inbounds %swift.task_executor_task_option, ptr [[EXECUTOR_RECORD]], i32 0, i32 0
160
156
// CHECK: [[FLAGS_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 0
161
157
// CHECK: store [[INT]] 5, ptr [[FLAGS_GEP]], align
162
158
// CHECK: [[PARENT_GEP:%.*]] = getelementptr inbounds %swift.task_option, ptr [[BASE_GEP]], i32 0, i32 1
163
- // CHECK: store [[INT]] [[OPTIONS_PTR ]], ptr [[PARENT_GEP]], align
159
+ // CHECK: store ptr [[GROUP_RECORD ]], ptr [[PARENT_GEP]], align
164
160
// CHECK: [[EXECUTOR_GEP:%.*]] = getelementptr inbounds %swift.task_executor_task_option, ptr [[EXECUTOR_RECORD]], i32 0, i32 1
165
161
// CHECK: [[EXECUTOR_IDENT_GEP:%.*]] = getelementptr inbounds %swift.executor, ptr [[EXECUTOR_GEP]], i32 0, i32 0
166
162
// CHECK: store [[INT]] %1, ptr [[EXECUTOR_IDENT_GEP]], align
167
163
// CHECK: [[EXECUTOR_IMPL_GEP:%.*]] = getelementptr inbounds %swift.executor, ptr [[EXECUTOR_GEP]], i32 0, i32 1
168
164
// CHECK: store [[INT]] %2, ptr [[EXECUTOR_IMPL_GEP]], align
169
- // CHECK: [[OPTIONS_PTR:%.*]] = ptrtoint ptr [[EXECUTOR_RECORD]] to [[INT]]
170
165
171
- // CHECK: call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %5, [[INT]] [[OPTIONS_PTR ]]
166
+ // CHECK: call swift{{(tail)?}}cc %swift.async_task_and_context @swift_task_create([[INT]] %5, ptr [[EXECUTOR_RECORD ]]
172
167
%9 = builtin "createAsyncTask"(%flags : $Int, %optSerialExecutor : $Optional<Builtin.Executor>, %optTaskGroup : $Optional<Builtin.RawPointer>, %optTaskExecutor: $Optional<Builtin.Executor>, %taskFunction : $@Sendable @async @callee_guaranteed () -> @error Error) : $(Builtin.NativeObject, Builtin.RawPointer)
173
168
%10 = tuple_extract %9 : $(Builtin.NativeObject, Builtin.RawPointer), 0
174
169
strong_release %10 : $Builtin.NativeObject
0 commit comments