1 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple aarch64 %s -o - | \
2 ; RUN: FileCheck %s --check-prefixes CHECK,V8A
3 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple aarch64 -mattr=+v8.3a %s -o - | \
4 ; RUN: FileCheck %s --check-prefixes CHECK,V83A
6 ;; Function a's outlining candidate contains a sp modifying add without a
7 ;; corresponsing sub, so we shouldn't outline it.
8 define void @a() "sign-return-address"="all" "sign-return-address-key"="b_key" {
9 ; CHECK-LABEL: a: // @a
11 ; CHECK-NEXT: .cfi_b_key_frame
14 ; CHECK-NEXT: .cfi_negate_ra_state
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
27 ; CHECK-NOT: bl OUTLINED_FUNCTION_{{[0-9]+}}
34 define void @b() "sign-return-address"="all" "sign-return-address-key"="b_key" nounwind {
35 ; CHECK-LABEL: b: // @b
36 ; CHECK-NEXT: // %bb.0:
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
51 ; CHECK: bl [[OUTLINED_FUNC:OUTLINED_FUNCTION_[0-9]+]]
58 define void @c() "sign-return-address"="all" "sign-return-address-key"="b_key" nounwind {
59 ; CHECK-LABEL: c: // @c
60 ; CHECK-NEXT: // %bb.0:
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
75 ; CHECK: bl [[OUTLINED_FUNC]]
82 ; CHECK: [[OUTLINED_FUNC]]