1 ; RUN: llc -mtriple aarch64-arm-linux-gnu --enable-machine-outliner \
2 ; RUN: -verify-machineinstrs %s -o - | FileCheck --check-prefixes CHECK,V8A %s
3 ; RUN-V83A: llc -mtriple aarch64-arm-none-eabi -enable-machine-outliner \
4 ; RUN-V83A: -verify-machineinstrs -mattr=+v8.3a %s -o - > %t
5 ; RUN-V83A: FileCheck --check-prefixes CHECK,V83A < %t %s
7 declare i32 @thunk_called_fn(i32, i32, i32, i32)
10 ; CHECK-LABEL: a: // @a
11 ; CHECK: // %bb.0: // %entry
18 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
19 %cx = add i32 %call, 8
24 ; CHECK-LABEL: b: // @b
25 ; CHECK: // %bb.0: // %entry
28 ; CHECK-NEXT: .cfi_negate_ra_state
33 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)
34 %cx = add i32 %call, 88
38 define hidden i32 @c(i32 (i32, i32, i32, i32)* %fptr) #0 {
39 ; CHECK-LABEL: c: // @c
40 ; CHECK: // %bb.0: // %entry
43 ; CHECK-NEXT: .cfi_negate_ra_state
48 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
49 %add = add nsw i32 %call, 8
53 define hidden i32 @d(i32 (i32, i32, i32, i32)* %fptr) #0 {
54 ; CHECK-LABEL: d: // @d
55 ; CHECK: // %bb.0: // %entry
58 ; CHECK-NEXT: .cfi_negate_ra_state
63 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)
64 %add = add nsw i32 %call, 88
68 attributes #0 = { "sign-return-address"="non-leaf" }
70 ; CHECK-NOT: OUTLINED_FUNCTION_{{.*}}
71 ; CHECK-NOT: .cfi_b_key_frame
72 ; CHECK-NOT: paci{{[a,b]}}sp
73 ; CHECK-NOT: hint #2{{[5,7]}}
74 ; CHECK-NOT: .cfi_negate_ra_state
75 ; CHECK-NOT: auti{{[a,b]}}sp
76 ; CHECK-NOT: hint #{{[29,31]}}