1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm64-apple-ios < %s | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-linux-gnu < %s | FileCheck -check-prefix CHECK-NOTMACHO %s
7 define void @odd() nounwind {
10 ; CHECK-NEXT: stp d15, d14, [sp, #-144]! ; 16-byte Folded Spill
11 ; CHECK-NEXT: stp d13, d12, [sp, #16] ; 16-byte Folded Spill
12 ; CHECK-NEXT: stp d11, d10, [sp, #32] ; 16-byte Folded Spill
13 ; CHECK-NEXT: stp d9, d8, [sp, #48] ; 16-byte Folded Spill
14 ; CHECK-NEXT: stp x28, x27, [sp, #64] ; 16-byte Folded Spill
15 ; CHECK-NEXT: stp x26, x25, [sp, #80] ; 16-byte Folded Spill
16 ; CHECK-NEXT: stp x24, x23, [sp, #96] ; 16-byte Folded Spill
17 ; CHECK-NEXT: stp x22, x21, [sp, #112] ; 16-byte Folded Spill
18 ; CHECK-NEXT: stp x20, x19, [sp, #128] ; 16-byte Folded Spill
19 ; CHECK-NEXT: ; InlineAsm Start
20 ; CHECK-NEXT: mov x0, #42 ; =0x2a
21 ; CHECK-NEXT: ; InlineAsm End
22 ; CHECK-NEXT: ldp x20, x19, [sp, #128] ; 16-byte Folded Reload
23 ; CHECK-NEXT: ldp x22, x21, [sp, #112] ; 16-byte Folded Reload
24 ; CHECK-NEXT: ldp x24, x23, [sp, #96] ; 16-byte Folded Reload
25 ; CHECK-NEXT: ldp x26, x25, [sp, #80] ; 16-byte Folded Reload
26 ; CHECK-NEXT: ldp x28, x27, [sp, #64] ; 16-byte Folded Reload
27 ; CHECK-NEXT: ldp d9, d8, [sp, #48] ; 16-byte Folded Reload
28 ; CHECK-NEXT: ldp d11, d10, [sp, #32] ; 16-byte Folded Reload
29 ; CHECK-NEXT: ldp d13, d12, [sp, #16] ; 16-byte Folded Reload
30 ; CHECK-NEXT: ldp d15, d14, [sp], #144 ; 16-byte Folded Reload
33 ; CHECK-NOTMACHO-LABEL: odd:
34 ; CHECK-NOTMACHO: // %bb.0:
35 ; CHECK-NOTMACHO-NEXT: stp d14, d12, [sp, #-80]! // 16-byte Folded Spill
36 ; CHECK-NOTMACHO-NEXT: stp d10, d8, [sp, #16] // 16-byte Folded Spill
37 ; CHECK-NOTMACHO-NEXT: str x27, [sp, #32] // 8-byte Folded Spill
38 ; CHECK-NOTMACHO-NEXT: stp x25, x23, [sp, #48] // 16-byte Folded Spill
39 ; CHECK-NOTMACHO-NEXT: stp x21, x19, [sp, #64] // 16-byte Folded Spill
40 ; CHECK-NOTMACHO-NEXT: //APP
41 ; CHECK-NOTMACHO-NEXT: mov x0, #42 // =0x2a
42 ; CHECK-NOTMACHO-NEXT: //NO_APP
43 ; CHECK-NOTMACHO-NEXT: ldp x21, x19, [sp, #64] // 16-byte Folded Reload
44 ; CHECK-NOTMACHO-NEXT: ldr x27, [sp, #32] // 8-byte Folded Reload
45 ; CHECK-NOTMACHO-NEXT: ldp x25, x23, [sp, #48] // 16-byte Folded Reload
46 ; CHECK-NOTMACHO-NEXT: ldp d10, d8, [sp, #16] // 16-byte Folded Reload
47 ; CHECK-NOTMACHO-NEXT: ldp d14, d12, [sp], #80 // 16-byte Folded Reload
48 ; CHECK-NOTMACHO-NEXT: ret
50 call void asm sideeffect "mov x0, #42", "~{x0},~{x19},~{x21},~{x23},~{x25},~{x27},~{d8},~{d10},~{d12},~{d14}"() nounwind
54 define void @even() nounwind {
57 ; CHECK-NEXT: stp d15, d14, [sp, #-144]! ; 16-byte Folded Spill
58 ; CHECK-NEXT: stp d13, d12, [sp, #16] ; 16-byte Folded Spill
59 ; CHECK-NEXT: stp d11, d10, [sp, #32] ; 16-byte Folded Spill
60 ; CHECK-NEXT: stp d9, d8, [sp, #48] ; 16-byte Folded Spill
61 ; CHECK-NEXT: stp x28, x27, [sp, #64] ; 16-byte Folded Spill
62 ; CHECK-NEXT: stp x26, x25, [sp, #80] ; 16-byte Folded Spill
63 ; CHECK-NEXT: stp x24, x23, [sp, #96] ; 16-byte Folded Spill
64 ; CHECK-NEXT: stp x22, x21, [sp, #112] ; 16-byte Folded Spill
65 ; CHECK-NEXT: stp x20, x19, [sp, #128] ; 16-byte Folded Spill
66 ; CHECK-NEXT: ; InlineAsm Start
67 ; CHECK-NEXT: mov x0, #42 ; =0x2a
68 ; CHECK-NEXT: ; InlineAsm End
69 ; CHECK-NEXT: ldp x20, x19, [sp, #128] ; 16-byte Folded Reload
70 ; CHECK-NEXT: ldp x22, x21, [sp, #112] ; 16-byte Folded Reload
71 ; CHECK-NEXT: ldp x24, x23, [sp, #96] ; 16-byte Folded Reload
72 ; CHECK-NEXT: ldp x26, x25, [sp, #80] ; 16-byte Folded Reload
73 ; CHECK-NEXT: ldp x28, x27, [sp, #64] ; 16-byte Folded Reload
74 ; CHECK-NEXT: ldp d9, d8, [sp, #48] ; 16-byte Folded Reload
75 ; CHECK-NEXT: ldp d11, d10, [sp, #32] ; 16-byte Folded Reload
76 ; CHECK-NEXT: ldp d13, d12, [sp, #16] ; 16-byte Folded Reload
77 ; CHECK-NEXT: ldp d15, d14, [sp], #144 ; 16-byte Folded Reload
80 ; CHECK-NOTMACHO-LABEL: even:
81 ; CHECK-NOTMACHO: // %bb.0:
82 ; CHECK-NOTMACHO-NEXT: stp d15, d13, [sp, #-80]! // 16-byte Folded Spill
83 ; CHECK-NOTMACHO-NEXT: stp d11, d9, [sp, #16] // 16-byte Folded Spill
84 ; CHECK-NOTMACHO-NEXT: str x28, [sp, #32] // 8-byte Folded Spill
85 ; CHECK-NOTMACHO-NEXT: stp x26, x24, [sp, #48] // 16-byte Folded Spill
86 ; CHECK-NOTMACHO-NEXT: stp x22, x20, [sp, #64] // 16-byte Folded Spill
87 ; CHECK-NOTMACHO-NEXT: //APP
88 ; CHECK-NOTMACHO-NEXT: mov x0, #42 // =0x2a
89 ; CHECK-NOTMACHO-NEXT: //NO_APP
90 ; CHECK-NOTMACHO-NEXT: ldp x22, x20, [sp, #64] // 16-byte Folded Reload
91 ; CHECK-NOTMACHO-NEXT: ldr x28, [sp, #32] // 8-byte Folded Reload
92 ; CHECK-NOTMACHO-NEXT: ldp x26, x24, [sp, #48] // 16-byte Folded Reload
93 ; CHECK-NOTMACHO-NEXT: ldp d11, d9, [sp, #16] // 16-byte Folded Reload
94 ; CHECK-NOTMACHO-NEXT: ldp d15, d13, [sp], #80 // 16-byte Folded Reload
95 ; CHECK-NOTMACHO-NEXT: ret
97 call void asm sideeffect "mov x0, #42", "~{x0},~{x20},~{x22},~{x24},~{x26},~{x28},~{d9},~{d11},~{d13},~{d15}"() nounwind