1 ; RUN: rm -rf %t && mkdir -p %t
2 ; RUN: llc -mtriple aarch64-unknown-windows-msvc %s -o - | FileCheck %s
3 ; RUN: llc -mtriple aarch64-unknown-windows-msvc -filetype obj %s -o %t/a.o
5 ; Check that the prologue/epilogue instructions for the swift async
6 ; context have an associated SEH instruction and that it doesn't error
7 ; when the output is an object file.
9 ; CHECK: orr x29, x29, #0x1000000000000000
10 ; CHECK-NEXT: .seh_nop
11 ; CHECK: str x22, [sp, #16]
12 ; CHECK-NEXT: .seh_nop
13 ; CHECK: and x29, x29, #0xefffffffffffffff
14 ; CHECK-NEXT: .seh_nop
16 declare ptr @llvm.swift.async.context.addr()
18 define internal swifttailcc void @test(ptr nocapture readonly swiftasync %0) {
20 %1 = load ptr, ptr %0, align 8
21 %2 = tail call ptr @llvm.swift.async.context.addr()
22 store ptr %1, ptr %2, align 8