Skip to content

Commit bc09fa3

Browse files
committed
[Distributed] NFC: Remove align 8 from the accessor thunks test-cases
1 parent 2180e4d commit bc09fa3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

test/Distributed/distributed_actor_accessor_thunks.swift

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public distributed actor MyOtherActor {
9090

9191
/// Read the current offset and cast an element to `Int`
9292

93-
// CHECK: store i8* %1, i8** %offset, align 8
94-
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset, align 8
93+
// CHECK: store i8* %1, i8** %offset
94+
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset
9595
// CHECK-NEXT: [[ELT_PTR:%.*]] = bitcast i8* %elt_offset to %TSi*
9696
// CHECK-NEXT: [[NATIVE_VAL_LOC:%.*]] = getelementptr inbounds %TSi, %TSi* [[ELT_PTR]], i32 0, i32 0
97-
// CHECK-NEXT: [[ARG_VAL:%.*]] = load i64, i64* [[NATIVE_VAL_LOC]], align 8
97+
// CHECK-NEXT: [[ARG_VAL:%.*]] = load i64, i64* [[NATIVE_VAL_LOC]]
9898

9999
/// Retrieve an async pointer to the distributed thunk for `simple1`
100100

@@ -117,7 +117,7 @@ public distributed actor MyOtherActor {
117117
// CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple2ySSSiFTETF"
118118

119119
/// !!! - We are not going to double-check argument extraction here since it's the same as `simple1`.
120-
// CHECK: [[NATIVE_ARG_VAL:%.*]] = load i64, i64* {{.*}}, align 8
120+
// CHECK: [[NATIVE_ARG_VAL:%.*]] = load i64, i64* {{.*}}
121121

122122
/// Load async pointer to distributed thunk for `simple2`
123123

@@ -140,8 +140,8 @@ public distributed actor MyOtherActor {
140140

141141
/// Initialize the result buffer with values produced by the thunk
142142

143-
// CHECK: store i64 [[STR_SIZE]], i64* %._guts._object._countAndFlagsBits._value, align 8
144-
// CHECK: store %swift.bridge* [[STR_VAL]], %swift.bridge** %._guts._object._object, align 8
143+
// CHECK: store i64 [[STR_SIZE]], i64* %._guts._object._countAndFlagsBits._value
144+
// CHECK: store %swift.bridge* [[STR_VAL]], %swift.bridge** %._guts._object._object
145145

146146
// CHECK: {{.*}} = call i1 (i8*, i1, ...) @llvm.coro.end.async({{.*}}, %swift.context* {{.*}}, %swift.error* {{.*}})
147147

@@ -158,7 +158,7 @@ public distributed actor MyOtherActor {
158158
// CHECK-NEXT: %._guts = getelementptr inbounds %TSS, %TSS* [[ELT_PTR]], i32 0, i32 0
159159

160160
// CHECK: [[STR_SIZE:%.*]] = load i64, i64* %._guts._object._countAndFlagsBits._value
161-
// CHECK: [[STR_VAL:%.*]] = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
161+
// CHECK: [[STR_VAL:%.*]] = load %swift.bridge*, %swift.bridge** %._guts._object._object
162162

163163
/// Load pointer to a distributed thunk for `simple3`
164164

@@ -174,7 +174,7 @@ public distributed actor MyOtherActor {
174174
// CHECK-NEXT: {{.*}} = call i8* @__swift_async_resume_project_context(i8* [[TASK_REF]])
175175
// CHECK: [[INT_RES:%.*]] = extractvalue { i8*, i64, %swift.error* } [[THUNK_RESULT]], 1
176176
// CHECK: %._value = getelementptr inbounds %TSi, %TSi* [[TYPED_RESULT_BUFF]], i32 0, i32 0
177-
// CHECK: store i64 [[INT_RES]], i64* %._value, align 8
177+
// CHECK: store i64 [[INT_RES]], i64* %._value
178178
// CHECK: {{.*}} = call i1 (i8*, i1, ...) @llvm.coro.end.async({{.*}}, %swift.context* {{.*}}, %swift.error* {{.*}})
179179

180180
/// --> Thunk and distributed method accessor for `single_case_enum`
@@ -187,8 +187,8 @@ public distributed actor MyOtherActor {
187187

188188
// CHECK: [[OFFSET:%.*]] = bitcast i8** %offset to i8*
189189
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[OFFSET]])
190-
// CHECK-NEXT: store i8* [[BUFFER]], i8** %offset, align 8
191-
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset, align 8
190+
// CHECK-NEXT: store i8* [[BUFFER]], i8** %offset
191+
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset
192192
// CHECK-NEXT: [[ELT_PTR:.*]] = bitcast i8* %elt_offset to %T27distributed_actor_accessors7SimpleEO*
193193
// CHECK-NEXT: [[OFFSET:%.*]] = bitcast i8** %offset to i8*
194194
// CHECK-NEXT call void @llvm.lifetime.end.p0i8(i64 8, i8* [[OFFSET]])
@@ -207,8 +207,8 @@ public distributed actor MyOtherActor {
207207
/// First, Load both arguments from the buffer.
208208

209209
// CHECK: [[TYPED_RESULT_BUFF:%.*]] = bitcast i8* %2 to %T27distributed_actor_accessors9IndirectEO*
210-
// CHECK: store i8* %1, i8** %offset, align 8
211-
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset, align 8
210+
// CHECK: store i8* %1, i8** %offset
211+
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset
212212

213213
// CHECK-NEXT: [[ENUM_PTR:%.*]] = bitcast i8* %elt_offset to %T27distributed_actor_accessors9IndirectEO*
214214
// CHECK-NEXT: [[NATIVE_ENUM_PTR:%.*]] = bitcast %T27distributed_actor_accessors9IndirectEO* [[ENUM_PTR]] to i64*
@@ -229,7 +229,7 @@ public distributed actor MyOtherActor {
229229
// CHECK-NEXT: {{.*}} = call i8* @__swift_async_resume_project_context(i8* [[TASK_REF]])
230230
// CHECK: [[ENUM_RESULT:%.*]] = extractvalue { i8*, i64, %swift.error* } [[THUNK_RESULT]], 1
231231
// CHECK: [[NATIVE_RESULT_PTR:%.*]] = bitcast %T27distributed_actor_accessors9IndirectEO* [[TYPED_RESULT_BUFF]] to i64*
232-
// CHECK-NEXT: store i64 [[ENUM_RESULT]], i64* [[NATIVE_RESULT_PTR]], align 8
232+
// CHECK-NEXT: store i64 [[ENUM_RESULT]], i64* [[NATIVE_RESULT_PTR]]
233233

234234
// CHECK: {{.*}} = call i1 (i8*, i1, ...) @llvm.coro.end.async({{.*}}, %swift.context* {{.*}}, %swift.error* {{.*}})
235235

@@ -246,24 +246,24 @@ public distributed actor MyOtherActor {
246246

247247
/// -> [Int]
248248

249-
// CHECK: %elt_offset = load i8*, i8** %offset, align 8
249+
// CHECK: %elt_offset = load i8*, i8** %offset
250250
// CHECK-NEXT: [[ARR_PTR:%.*]] = bitcast i8* %elt_offset to %TSa*
251251
// CHECK-NEXT: %._buffer = getelementptr inbounds %TSa, %TSa* [[ARR_PTR]], i32 0, i32 0
252252
// CHECK: [[NATIVE_ARR_VAL:%.*]] = load [[ARR_STORAGE_TYPE:%.*]], [[ARR_STORAGE_TYPE]]* %._buffer._storage
253253
// CHECK: [[ARR_PTR_INT:%.*]] = ptrtoint %TSa* [[ARR_PTR]] to i64
254254
// CHECK-NEXT: [[NEXT_ELT:%.*]] = add i64 [[ARR_PTR_INT]], 8
255255
// CHECK-NEXT: [[OPAQUE_NEXT_ELT:%.*]] = inttoptr i64 [[NEXT_ELT]] to i8*
256-
// CHECK-NEXT: store i8* [[OPAQUE_NEXT_ELT]], i8** %offset, align 8
256+
// CHECK-NEXT: store i8* [[OPAQUE_NEXT_ELT]], i8** %offset
257257

258258
/// -> Obj
259259

260-
// CHECK-NEXT: %elt_offset1 = load i8*, i8** %offset, align 8
260+
// CHECK-NEXT: %elt_offset1 = load i8*, i8** %offset
261261
// CHECK-NEXT: [[OBJ_PTR:%.*]] = bitcast i8* %elt_offset1 to %T27distributed_actor_accessors3ObjC**
262-
// CHECK-NEXT: [[NATIVE_OBJ_VAL:%.*]] = load %T27distributed_actor_accessors3ObjC*, %T27distributed_actor_accessors3ObjC** [[OBJ_PTR]], align 8
262+
// CHECK-NEXT: [[NATIVE_OBJ_VAL:%.*]] = load %T27distributed_actor_accessors3ObjC*, %T27distributed_actor_accessors3ObjC** [[OBJ_PTR]]
263263
// CHECK: [[OBJ_PTR_INT:%.*]] = ptrtoint %T27distributed_actor_accessors3ObjC** [[OBJ_PTR]] to i64
264264
// CHECK-NEXT: [[NEXT_ELT:%.*]] = add i64 [[OBJ_PTR_INT]], 8
265265
// CHECK-NEXT: [[NEXT_ELT_PTR:%.*]] = inttoptr i64 [[NEXT_ELT]] to i8*
266-
// CHECK-NEXT: store i8* [[NEXT_ELT_PTR]], i8** %offset, align 8
266+
// CHECK-NEXT: store i8* [[NEXT_ELT_PTR]], i8** %offset
267267

268268
/// -> String?
269269

@@ -281,7 +281,7 @@ public distributed actor MyOtherActor {
281281

282282
/// -> LargeStruct (passed indirectly)
283283

284-
// CHECK-NEXT: %elt_offset3 = load i8*, i8** %offset, align 8
284+
// CHECK-NEXT: %elt_offset3 = load i8*, i8** %offset
285285
// CHECK-NEXT: [[STRUCT_PTR:%.*]] = bitcast i8* %elt_offset3 to %T27distributed_actor_accessors11LargeStructV*
286286

287287
// CHECK: [[INDIRECT_RESULT_BUFF:%.*]] = bitcast %swift.opaque* [[TYPED_RESULT_BUFF]] to %T27distributed_actor_accessors11LargeStructV*
@@ -300,11 +300,11 @@ public distributed actor MyOtherActor {
300300

301301
// CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[RESULT_BUFF:%.*]], %swift.refcounted* swiftself {{.*}})
302302
// CHECK-NEXT: entry:
303-
// CHECK-NEXT: {{.*}} = alloca %swift.context*, align 8
304-
// CHECK-NEXT: %swifterror = alloca swifterror %swift.error*, align 8
303+
// CHECK-NEXT: {{.*}} = alloca %swift.context*
304+
// CHECK-NEXT: %swifterror = alloca swifterror %swift.error*
305305
// CHECK-NEXT: {{.*}} = call token @llvm.coro.id.async(i32 20, i32 16, i32 0, i8* bitcast (%swift.async_func_pointer* @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTETFTu" to i8*))
306306
// CHECK-NEXT: {{.*}} = call i8* @llvm.coro.begin(token {{%.*}}, i8* null)
307-
// CHECK-NEXT: store %swift.context* {{.*}}, %swift.context** {{.*}}, align 8
308-
// CHECK-NEXT: store %swift.error* null, %swift.error** %swifterror, align 8
307+
// CHECK-NEXT: store %swift.context* {{.*}}, %swift.context** {{.*}}
308+
// CHECK-NEXT: store %swift.error* null, %swift.error** %swifterror
309309
// CHECK-NEXT: {{.*}} = bitcast i8* [[RESULT_BUFF]] to %swift.opaque*
310-
// CHECK-NEXT: {{.*}} = load i32, i32* getelementptr inbounds (%swift.async_func_pointer, %swift.async_func_pointer* bitcast (void (%swift.context*, %T27distributed_actor_accessors12MyOtherActorC*)* @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTE" to %swift.async_func_pointer*), i32 0, i32 0), align 8
310+
// CHECK-NEXT: {{.*}} = load i32, i32* getelementptr inbounds (%swift.async_func_pointer, %swift.async_func_pointer* bitcast (void (%swift.context*, %T27distributed_actor_accessors12MyOtherActorC*)* @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTE" to %swift.async_func_pointer*), i32 0, i32 0)

0 commit comments

Comments
 (0)