Skip to content

Commit 8b89095

Browse files
committed
Strengthen macOS extended frame test
Adding test to verify correct behavior from swift when targeting arm64 macOS. We caught the fact that the optimizer got smarter on arm64 in the watchOS test, which doesn't seem to get run in PR testing. The updated test catches it now.
1 parent 83f44cd commit 8b89095

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/IRGen/swift_async_extended_frame_info.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
// RUN: %target-swift-frontend -disable-availability-checking -swift-async-frame-pointer=never -target x86_64-apple-macosx12 %s -S | %FileCheck -check-prefix=NEVER %s
77
// RUN: %target-swift-frontend -disable-availability-checking -swift-async-frame-pointer=always -target x86_64-apple-macosx11 %s -S | %FileCheck -check-prefix=ALWAYS %s
88
// RUN: %target-swift-frontend -disable-availability-checking -swift-async-frame-pointer=always -target x86_64-apple-macosx12 %s -S | %FileCheck -check-prefix=ALWAYS %s
9+
// RUN: %target-swift-frontend -disable-availability-checking -swift-async-frame-pointer=never -target arm64-apple-macos12 %s -S | %FileCheck -check-prefix=NEVER-ARM64 %s
10+
// RUN: %target-swift-frontend -disable-availability-checking -swift-async-frame-pointer=always -target arm64-apple-macos12 %s -S | %FileCheck -check-prefix=ALWAYS-ARM64 %s
911

1012
// REQUIRES: OS=macosx
11-
// REQUIRES: CPU=x86_64
13+
// REQUIRES: CODEGENERATOR=X86 && CODEGENERATOR=AArch64
14+
15+
@_silgen_name("opaque_function")
16+
func blarpy()
1217

1318
public func someAsyncFunction() async {
19+
blarpy()
1420
}
1521

1622
// AUTO: s31swift_async_extended_frame_info17someAsyncFunctionyyYaF:
@@ -26,3 +32,11 @@ public func someAsyncFunction() async {
2632
// AUTO: .weak_reference _swift_async_extendedFramePointerFlags
2733
// NEVER-NOT: .weak_reference _swift_async_extendedFramePointerFlags
2834
// ALWAYS-NOT: .weak_reference _swift_async_extendedFramePointerFlags
35+
36+
// NEVER-ARM64: s31swift_async_extended_frame_info17someAsyncFunctionyyYaFTY0
37+
// NEVER-ARM64-NOT: swift_async_extendedFramePointerFlags
38+
// NEVER-ARM64-NOT: #0x1000000000000000
39+
40+
// ALWAYS-ARM64: s31swift_async_extended_frame_info17someAsyncFunctionyyYaFTY0
41+
// ALWAYS-ARM64-NOT: swift_async_extendedFramePointerFlags
42+
// ALWAYS-ARM64: #0x1000000000000000

0 commit comments

Comments
 (0)