1 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -homogeneous-prolog-epilog -frame-helper-size-threshold=6 | FileCheck %s
2 ; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -homogeneous-prolog-epilog -frame-helper-size-threshold=6 | FileCheck %s --check-prefixes=CHECK-LINUX
4 ; CHECK-LABEL: __Z3foofffi:
5 ; CHECK: stp d11, d10, [sp, #-64]!
6 ; CHECK-NEXT: stp d9, d8, [sp, #16]
7 ; CHECK-NEXT: stp x20, x19, [sp, #32]
8 ; CHECK-NEXT: stp x29, x30, [sp, #48]
9 ; CHECK-NEXT: add x29, sp, #48
12 ; CHECK: ldp x29, x30, [sp, #48]
13 ; CHECK: ldp x20, x19, [sp, #32]
14 ; CHECK: ldp d9, d8, [sp, #16]
15 ; CHECK: ldp d11, d10, [sp], #64
18 ; CHECK-LINUX-LABEL: _Z3foofffi:
19 ; CHECK-LINUX: stp d11, d10, [sp, #-64]!
20 ; CHECK-LINUX-NEXT: stp d9, d8, [sp, #16]
21 ; CHECK-LINUX-NEXT: stp x29, x30, [sp, #32]
22 ; CHECK-LINUX-NEXT: stp x20, x19, [sp, #48]
23 ; CHECK-LINUX-NEXT: add x29, sp, #32
24 ; CHECK-LINUX: bl _Z3goof
25 ; CHECK-LINUX: bl _Z3goof
26 ; CHECK-LINUX: ldp x20, x19, [sp, #48]
27 ; CHECK-LINUX: ldp x29, x30, [sp, #32]
28 ; CHECK-LINUX: ldp d9, d8, [sp, #16]
29 ; CHECK-LINUX: ldp d11, d10, [sp], #64
32 define float @_Z3foofffi(float %b, float %x, float %y, i32 %z) uwtable ssp minsize "frame-pointer"="non-leaf" {
34 %inc = fadd float %b, 1.000000e+00
35 %add = fadd float %inc, %x
36 %add1 = fadd float %add, %y
37 %conv = sitofp i32 %z to float
38 %sub = fsub float %add1, %conv
39 %dec = add nsw i32 %z, -1
40 %call = tail call float @_Z3goof(float %inc) #2
41 %call2 = tail call float @_Z3goof(float %sub) #2
42 %add3 = fadd float %call, %call2
43 %mul = fmul float %inc, %add3
44 %add4 = fadd float %sub, %mul
45 %conv5 = sitofp i32 %dec to float
46 %sub6 = fsub float %add4, %conv5
50 ; CHECK-LABEL: __Z3zoov:
51 ; CHECK: stp x29, x30, [sp, #-16]!
53 ; CHECK: ldp x29, x30, [sp], #16
56 ; CHECK-LINUX-LABEL: _Z3zoov:
57 ; CHECK-LINUX: stp x29, x30, [sp, #-16]!
58 ; CHECK-LINUX: bl _Z3hoo
59 ; CHECK-LINUX: ldp x29, x30, [sp], #16
60 ; CHECK-LINUX-NEXT: ret
62 define i32 @_Z3zoov() nounwind ssp minsize {
63 %1 = tail call i32 @_Z3hoov() #2
64 %2 = add nsw i32 %1, 1
69 declare float @_Z3goof(float) nounwind ssp minsize
70 declare i32 @_Z3hoov() nounwind ssp minsize