Skip to content

Commit d37714f

Browse files
committed
[Test] Adapt async/hop_to_executor.sil to arm64e.
rdar://74098395
1 parent 69d251a commit d37714f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/IRGen/async/hop_to_executor.sil

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-frontend -enable-experimental-concurrency -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-ptrsize
22

33
// REQUIRES: concurrency
4-
// REQUIRES: rdar74098395
54

65
sil_stage canonical
76

@@ -36,11 +35,17 @@ bb0(%0 : $MyActor):
3635
return %3 : $()
3736
}
3837

39-
// CHECK-LABEL: define internal void @__swift_suspend_point(i8* %0, %swift.executor* %1, %swift.task* %2, %swift.executor* %3, %swift.context* %4)
38+
// CHECK-LABEL: define internal void @__swift_suspend_point
39+
// CHECK-SAME: (i8* %0, %swift.executor* %1, %swift.task* %2, %swift.executor* %3, %swift.context* [[CTXT:%[^,]+]])
4040
// CHECK: [[RESUME_ADDR:%[0-9]+]] = getelementptr inbounds %swift.task, %swift.task* %2, i32 0, i32 4
4141
// CHECK: store i8* %0, i8** [[RESUME_ADDR]]
4242
// CHECK: [[CTXT_ADDR:%[0-9]+]] = getelementptr inbounds %swift.task, %swift.task* %2, i32 0, i32 5
43-
// CHECK: store %swift.context* %4, %swift.context** [[CTXT_ADDR]]
43+
// CHECK-arm64e: [[CTXT_ADDR_INT:%[^,]+]] = ptrtoint %swift.context** [[CTXT_ADDR]] to i64
44+
// CHECK-arm64e: [[PTRAUTH_BLEND:%[^,]+]] = call i64 @llvm.ptrauth.blend.i64(i64 [[CTXT_ADDR_INT]], i64 30010)
45+
// CHECK-arm64e: [[CTXT_INT:%[^,]+]] = ptrtoint %swift.context* [[CTXT]] to i64
46+
// CHECK-arm64e: [[PTRAUTH_SIGN:%[^,]+]] = call i64 @llvm.ptrauth.sign.i64(i64 [[CTXT_INT]], i32 2, i64 [[PTRAUTH_BLEND]])
47+
// CHECK-arm64e: [[CTXT:%[^,]+]] = inttoptr i64 [[PTRAUTH_SIGN]] to %swift.context*
48+
// CHECK: store %swift.context* [[CTXT]], %swift.context** [[CTXT_ADDR]]
4449
// CHECK: tail call swiftcc void @swift_task_switch(%swift.task* %2, %swift.executor* %3, %swift.executor* %1)
4550
// CHECK: ret void
4651

0 commit comments

Comments
 (0)