Skip to content

[Test] Adapt async/hop_to_executor.sil to arm64e. #35947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions test/IRGen/async/hop_to_executor.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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

// REQUIRES: concurrency
// REQUIRES: rdar74098395

sil_stage canonical

Expand Down Expand Up @@ -36,11 +35,17 @@ bb0(%0 : $MyActor):
return %3 : $()
}

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

Expand Down