1 ; RUN: llc < %s -mtriple=aarch64-windows | FileCheck %s
3 define dso_local i32 @func(ptr %g, i32 %a) {
9 define dso_local i32 @func2(ptr %g, i32 %a) "target-features"="+v8.3a" {
11 tail call void %g() #2
15 !llvm.module.flags = !{!0}
17 !0 = !{i32 8, !"sign-return-address", i32 1}
20 ; CHECK-NEXT: .seh_proc func
21 ; CHECK-NEXT: // %bb.0:
22 ; CHECK-NEXT: hint #27
23 ; CHECK-NEXT: .seh_pac_sign_lr
24 ; CHECK-NEXT: str x19, [sp, #-16]!
25 ; CHECK-NEXT: .seh_save_reg_x x19, 16
26 ; CHECK-NEXT: str x30, [sp, #8]
27 ; CHECK-NEXT: .seh_save_reg x30, 8
28 ; CHECK-NEXT: .seh_endprologue
30 ; CHECK: .seh_startepilogue
31 ; CHECK-NEXT: ldr x30, [sp, #8]
32 ; CHECK-NEXT: .seh_save_reg x30, 8
33 ; CHECK-NEXT: ldr x19, [sp], #16
34 ; CHECK-NEXT: .seh_save_reg_x x19, 16
35 ; CHECK-NEXT: hint #31
36 ; CHECK-NEXT: .seh_pac_sign_lr
37 ; CHECK-NEXT: .seh_endepilogue
39 ; CHECK-NEXT: .seh_endfunclet
40 ; CHECK-NEXT: .seh_endproc
42 ;; For func2, check that the potentially folded autibsp+ret -> retab
43 ;; is handled correctly - currently we inhibit producing retab here.
46 ; CHECK-NEXT: .seh_proc func2
47 ; CHECK-NEXT: // %bb.0:
49 ; CHECK-NEXT: .seh_pac_sign_lr
50 ; CHECK-NEXT: str x19, [sp, #-16]!
51 ; CHECK-NEXT: .seh_save_reg_x x19, 16
52 ; CHECK-NEXT: str x30, [sp, #8]
53 ; CHECK-NEXT: .seh_save_reg x30, 8
54 ; CHECK-NEXT: .seh_endprologue
56 ; CHECK: .seh_startepilogue
57 ; CHECK-NEXT: ldr x30, [sp, #8]
58 ; CHECK-NEXT: .seh_save_reg x30, 8
59 ; CHECK-NEXT: ldr x19, [sp], #16
60 ; CHECK-NEXT: .seh_save_reg_x x19, 16
62 ; CHECK-NEXT: .seh_pac_sign_lr
63 ; CHECK-NEXT: .seh_endepilogue
65 ; CHECK-NEXT: .seh_endfunclet
66 ; CHECK-NEXT: .seh_endproc