1 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple \
2 ; RUN: aarch64-arm-linux-gnu %s -o - | FileCheck %s
4 ; Check that functions that should sign their return addresses don't get
5 ; outlined if not all of the function either support v8.3a features or all of
6 ; the functions don't!!
9 ; CHECK-LABEL: a: // @a
11 ; CHECK-NEXT: .cfi_b_key_frame
13 ; CHECK: .cfi_negate_ra_state
14 ; CHECK-NEXT: .cfi_def_cfa_offset
15 ; CHECK-NOT: OUTLINED_FUNCTION_
16 %1 = alloca i32, align 4
17 %2 = alloca i32, align 4
18 %3 = alloca i32, align 4
19 %4 = alloca i32, align 4
20 %5 = alloca i32, align 4
21 %6 = alloca i32, align 4
22 store i32 1, ptr %1, align 4
23 store i32 2, ptr %2, align 4
24 store i32 3, ptr %3, align 4
25 store i32 4, ptr %4, align 4
26 store i32 5, ptr %5, align 4
27 store i32 6, ptr %6, align 4
28 ; CHECK-NOT: auti{{[a,b]}}sp
34 ; CHECK-LABEL: b: // @b
36 ; CHECK-NEXT: .cfi_b_key_frame
38 ; CHECK: .cfi_negate_ra_state
39 ; CHECK-NEXT: .cfi_def_cfa_offset
40 ; CHECK-NOT: OUTLINED_FUNCTION_
41 %1 = alloca i32, align 4
42 %2 = alloca i32, align 4
43 %3 = alloca i32, align 4
44 %4 = alloca i32, align 4
45 %5 = alloca i32, align 4
46 %6 = alloca i32, align 4
47 store i32 1, ptr %1, align 4
48 store i32 2, ptr %2, align 4
49 store i32 3, ptr %3, align 4
50 store i32 4, ptr %4, align 4
51 store i32 5, ptr %5, align 4
52 store i32 6, ptr %6, align 4
53 ; CHECK-NOT: auti{{[a,b]}}sp
59 ; CHECK-LABEL: c: // @c
61 ; CHECK-NEXT: .cfi_b_key_frame
62 ; CHECK-NEXT: hint #27
63 ; CHECK: .cfi_negate_ra_state
64 ; CHECK-NEXT: .cfi_def_cfa_offset
65 ; CHECK-NOT: OUTLINED_FUNCTION_
66 %1 = alloca i32, align 4
67 %2 = alloca i32, align 4
68 %3 = alloca i32, align 4
69 %4 = alloca i32, align 4
70 %5 = alloca i32, align 4
71 %6 = alloca i32, align 4
72 store i32 1, ptr %1, align 4
73 store i32 2, ptr %2, align 4
74 store i32 3, ptr %3, align 4
75 store i32 4, ptr %4, align 4
76 store i32 5, ptr %5, align 4
77 store i32 6, ptr %6, align 4
79 ; CHECK-NOT: ret{{[a,b]}}
83 attributes #0 = { "sign-return-address"="all"
84 "sign-return-address-key"="b_key"
85 "target-features"="+v8.3a" }
87 attributes #1 = { "sign-return-address"="all"
88 "sign-return-address-key"="b_key" }
90 ; CHECK-NOT: OUTLINED_FUNCTION_