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-NEXT: .cfi_negate_ra_state
14 ; CHECK-NOT: OUTLINED_FUNCTION_
15 %1 = alloca i32, align 4
16 %2 = alloca i32, align 4
17 %3 = alloca i32, align 4
18 %4 = alloca i32, align 4
19 %5 = alloca i32, align 4
20 %6 = alloca i32, align 4
21 store i32 1, ptr %1, align 4
22 store i32 2, ptr %2, align 4
23 store i32 3, ptr %3, align 4
24 store i32 4, ptr %4, align 4
25 store i32 5, ptr %5, align 4
26 store i32 6, ptr %6, align 4
28 ; CHECK-NOT: auti[a,b]sp
33 ; CHECK-LABEL: b: // @b
35 ; CHECK-NEXT: .cfi_b_key_frame
37 ; CHECK-NEXT: .cfi_negate_ra_state
38 ; CHECK-NOT: OUTLINED_FUNCTION_
39 %1 = alloca i32, align 4
40 %2 = alloca i32, align 4
41 %3 = alloca i32, align 4
42 %4 = alloca i32, align 4
43 %5 = alloca i32, align 4
44 %6 = alloca i32, align 4
45 store i32 1, ptr %1, align 4
46 store i32 2, ptr %2, align 4
47 store i32 3, ptr %3, align 4
48 store i32 4, ptr %4, align 4
49 store i32 5, ptr %5, align 4
50 store i32 6, ptr %6, align 4
52 ; CHECK-NOT: auti[a,b]sp
57 ; CHECK-LABEL: c: // @c
59 ; CHECK-NEXT: .cfi_b_key_frame
60 ; CHECK-NEXT: hint #27
61 ; CHECK-NEXT: .cfi_negate_ra_state
62 ; CHECK-NOT: OUTLINED_FUNCTION_
63 %1 = alloca i32, align 4
64 %2 = alloca i32, align 4
65 %3 = alloca i32, align 4
66 %4 = alloca i32, align 4
67 %5 = alloca i32, align 4
68 %6 = alloca i32, align 4
69 store i32 1, ptr %1, align 4
70 store i32 2, ptr %2, align 4
71 store i32 3, ptr %3, align 4
72 store i32 4, ptr %4, align 4
73 store i32 5, ptr %5, align 4
74 store i32 6, ptr %6, align 4
76 ; CHECK-NOT: ret{{[a,b]}}
80 attributes #0 = { "sign-return-address"="all"
81 "sign-return-address-key"="b_key"
82 "target-features"="+v8.3a" }
84 attributes #1 = { "sign-return-address"="all"
85 "sign-return-address-key"="b_key" }
87 ; CHECK-NOT: OUTLINED_FUNCTION_