1 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -homogeneous-prolog-epilog | FileCheck %s
2 ; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -homogeneous-prolog-epilog | FileCheck %s --check-prefixes=CHECK-LINUX
4 ; CHECK-LABEL: __Z3foofffi:
5 ; CHECK: stp x29, x30, [sp, #-16]!
6 ; CHECK-NEXT: bl _OUTLINED_FUNCTION_PROLOG_FRAME48_x30x29x19x20d8d9d10d11
9 ; CHECK: b _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29x19x20d8d9d10d11
11 ; CHECK-LINUX-LABEL: _Z3foofffi:
12 ; CHECK-LINUX: stp x29, x30, [sp, #-32]!
13 ; CHECK-LINUX-NEXT: bl OUTLINED_FUNCTION_PROLOG_FRAME32_x19x20x30x29d8d9d10d11
14 ; CHECK-LINUX: bl _Z3goof
15 ; CHECK-LINUX: bl _Z3goof
16 ; CHECK-LINUX: b OUTLINED_FUNCTION_EPILOG_TAIL_x19x20x30x29d8d9d10d11
18 define float @_Z3foofffi(float %b, float %x, float %y, i32 %z) ssp minsize "frame-pointer"="non-leaf" {
20 %inc = fadd float %b, 1.000000e+00
21 %add = fadd float %inc, %x
22 %add1 = fadd float %add, %y
23 %conv = sitofp i32 %z to float
24 %sub = fsub float %add1, %conv
25 %dec = add nsw i32 %z, -1
26 %call = tail call float @_Z3goof(float %inc) #2
27 %call2 = tail call float @_Z3goof(float %sub) #2
28 %add3 = fadd float %call, %call2
29 %mul = fmul float %inc, %add3
30 %add4 = fadd float %sub, %mul
31 %conv5 = sitofp i32 %dec to float
32 %sub6 = fsub float %add4, %conv5
36 ; CHECK-LABEL: _Z3zoov:
37 ; CHECK: stp x29, x30, [sp, #-16]!
39 ; CHECK: b _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29
41 define i32 @_Z3zoov() nounwind ssp minsize {
42 %1 = tail call i32 @_Z3hoov() #2
43 %2 = add nsw i32 %1, 1
48 declare float @_Z3goof(float) nounwind ssp minsize
49 declare i32 @_Z3hoov() nounwind ssp optsize
51 ; CHECK-LABEL: _OUTLINED_FUNCTION_PROLOG_FRAME48_x30x29x19x20d8d9d10d11:
52 ; CHECK: stp d11, d10, [sp, #-48]!
53 ; CHECK-NEXT: stp d9, d8, [sp, #16]
54 ; CHECK-NEXT: stp x20, x19, [sp, #32]
55 ; CHECK-NEXT: add x29, sp, #48
58 ; CHECK-LABEL: _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29x19x20d8d9d10d11:
59 ; CHECK: ldp x29, x30, [sp, #48]
60 ; CHECK-NEXT: ldp x20, x19, [sp, #32]
61 ; CHECK-NEXT: ldp d9, d8, [sp, #16]
62 ; CHECK-NEXT: ldp d11, d10, [sp], #64
65 ; CHECK-LABEL: _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29:
66 ; CHECK: ldp x29, x30, [sp], #16
69 ; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_PROLOG_FRAME32_x19x20x30x29d8d9d10d11:
70 ; CHECK-LINUX: stp d11, d10, [sp, #-32]!
71 ; CHECK-LINUX-NEXT: stp d9, d8, [sp, #16]
72 ; CHECK-LINUX-NEXT: stp x20, x19, [sp, #48]
73 ; CHECK-LINUX-NEXT: add x29, sp, #32
74 ; CHECK-LINUX-NEXT: ret
76 ; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_EPILOG_TAIL_x19x20x30x29d8d9d10d11:
77 ; CHECK-LINUX: ldp x20, x19, [sp, #48]
78 ; CHECK-LINUX-NEXT: ldp x29, x30, [sp, #32]
79 ; CHECK-LINUX-NEXT: ldp d9, d8, [sp, #16]
80 ; CHECK-LINUX-NEXT: ldp d11, d10, [sp], #64
81 ; CHECK-LINUX-NEXT: ret
83 ; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_EPILOG_TAIL_x30x29:
84 ; CHECK-LINUX: ldp x29, x30, [sp], #16
85 ; CHECK-LINUX-NEXT: ret