1 ; RUN: llc < %s -mtriple=arm64-apple-ios-8.0.0 | FileCheck %s
3 declare void @standard_cc_func()
4 declare preserve_mostcc void @preserve_mostcc_func()
6 ; Registers r9-r15 should be saved before the call of a function
7 ; with a standard calling convention.
8 define preserve_mostcc void @preserve_mostcc1() nounwind {
10 ;CHECK-LABEL: preserve_mostcc1
14 ;CHECK-NEXT: stp x14, x13,
15 ;CHECK-NEXT: stp x12, x11,
16 ;CHECK-NEXT: stp x10, x9,
17 ;CHECK: bl _standard_cc_func
18 call void @standard_cc_func()
20 ;CHECK-NEXT: ldp x12, x11,
21 ;CHECK-NEXT: ldp x14, x13,
26 ; Registers r9-r15 don't need to be saved if one
27 ; function with preserve_mostcc calling convention calls another
28 ; function with preserve_mostcc calling convention, because the
29 ; callee wil save these registers anyways.
30 define preserve_mostcc void @preserve_mostcc2() nounwind {
32 ;CHECK-LABEL: preserve_mostcc2
36 ;CHECK: bl _preserve_mostcc_func
37 call preserve_mostcc void @preserve_mostcc_func()