• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple \
2; RUN: aarch64-arm-none-eabi %s -o - | FileCheck %s --check-prefixes CHECK,V8A
3; RUN-V83A: llc -verify-machineinstrs -enable-machine-outliner -mtriple \
4; RUN-V83A: aarch64-arm-none-eabi -mattr=+v8.3a %s -o - > %t
5; RUN-V83A: FileCheck --check-prefixes CHECK,V83A < %t %s
6
7define void @a() "sign-return-address"="all" {
8; CHECK-LABEL:      a:                                     // @a
9; V8A:              hint #25
10; V83A:             paciasp
11; CHECK-NEXT:       .cfi_negate_ra_state
12  %1 = alloca i32, align 4
13  %2 = alloca i32, align 4
14  %3 = alloca i32, align 4
15  %4 = alloca i32, align 4
16  %5 = alloca i32, align 4
17  %6 = alloca i32, align 4
18  store i32 1, i32* %1, align 4
19  store i32 2, i32* %2, align 4
20  store i32 3, i32* %3, align 4
21  store i32 4, i32* %4, align 4
22  store i32 5, i32* %5, align 4
23  store i32 6, i32* %6, align 4
24; V8A:            hint #29
25; V83A:           autiasp
26  ret void
27; CHECK:          .cfi_endproc
28}
29
30define void @b() "sign-return-address"="all" "sign-return-address-key"="b_key" {
31; CHECK-LABEL:      b:                                     // @b
32; CHECK:            .cfi_b_key_frame
33; V8A-NEXT:         hint #27
34; V83A-NEXT:        pacibsp
35; CHECK-NEXT:       .cfi_negate_ra_state
36  %1 = alloca i32, align 4
37  %2 = alloca i32, align 4
38  %3 = alloca i32, align 4
39  %4 = alloca i32, align 4
40  %5 = alloca i32, align 4
41  %6 = alloca i32, align 4
42  store i32 1, i32* %1, align 4
43  store i32 2, i32* %2, align 4
44  store i32 3, i32* %3, align 4
45  store i32 4, i32* %4, align 4
46  store i32 5, i32* %5, align 4
47  store i32 6, i32* %6, align 4
48; V8A-NOT:          hint #29
49; V83A-NOT:         autiasp
50  ret void
51; CHECK:            .cfi_endproc
52}
53
54define void @c() "sign-return-address"="all" {
55; CHECK-LABEL:      c:                                     // @c
56; V8A:              hint #25
57; V83A:             paciasp
58; CHECK-NEXT:       .cfi_negate_ra_state
59  %1 = alloca i32, align 4
60  %2 = alloca i32, align 4
61  %3 = alloca i32, align 4
62  %4 = alloca i32, align 4
63  %5 = alloca i32, align 4
64  %6 = alloca i32, align 4
65  store i32 1, i32* %1, align 4
66  store i32 2, i32* %2, align 4
67  store i32 3, i32* %3, align 4
68  store i32 4, i32* %4, align 4
69  store i32 5, i32* %5, align 4
70  store i32 6, i32* %6, align 4
71; V8A:            hint #29
72; V83A:           autiasp
73  ret void
74; CHECK:          .cfi_endproc
75}
76
77; CHECK-NOT:      OUTLINED_FUNCTION_0:
78; CHECK-NOT:      // -- Begin function
79