1 ; RUN: llc --mtriple armv7-eabihf %s -o - | FileCheck %s
3 %struct.S0 = type { [4 x float] }
4 %struct.S1 = type { [2 x float] }
5 %struct.S2 = type { [4 x float] }
6 %struct.D0 = type { [2 x double] }
7 %struct.D1 = type { [2 x double] }
8 %struct.D2 = type { [4 x double] }
11 define dso_local float @f0_0(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, %struct.S0 %s.coerce) local_unnamed_addr #0 {
13 %s.coerce.fca.0.0.extract = extractvalue %struct.S0 %s.coerce, 0, 0
14 ret float %s.coerce.fca.0.0.extract
17 ; CHECK: vmov.f32 s0, s12
20 ; pass in memory, no memory/regs split
21 define dso_local float @f0_1(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, float %x, %struct.S0 %s.coerce) local_unnamed_addr #0 {
23 %s.coerce.fca.0.0.extract = extractvalue %struct.S0 %s.coerce, 0, 0
24 ret float %s.coerce.fca.0.0.extract
27 ; CHECK: vldr s0, [sp]
30 ; pass in memory, alignment 4
31 define dso_local float @f0_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.S0 %s.coerce) local_unnamed_addr #0 {
33 %s.coerce.fca.0.0.extract = extractvalue %struct.S0 %s.coerce, 0, 0
34 ret float %s.coerce.fca.0.0.extract
37 ; CHECK: vldr s0, [sp, #4]
41 define dso_local float @f1_0(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, %struct.S1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
43 %s.coerce.fca.0.0.extract = extractvalue %struct.S1 %s.coerce, 0, 0
44 ret float %s.coerce.fca.0.0.extract
47 ; CHECK: vmov.f32 s0, s14
50 ; pass in memory, no memory/regs split
51 define dso_local float @f1_1(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, float %x, %struct.S1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
53 %s.coerce.fca.0.0.extract = extractvalue %struct.S1 %s.coerce, 0, 0
54 ret float %s.coerce.fca.0.0.extract
57 ; CHECK: vldr s0, [sp]
60 ; pass in memory, alignment 8
61 define dso_local float @f1_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.S1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
63 %s.coerce.fca.0.0.extract = extractvalue %struct.S1 %s.coerce, 0, 0
64 ret float %s.coerce.fca.0.0.extract
67 ; CHECK: vldr s0, [sp, #8]
71 define dso_local float @f2_0(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, %struct.S2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
73 %s.coerce.fca.0.0.extract = extractvalue %struct.S2 %s.coerce, 0, 0
74 ret float %s.coerce.fca.0.0.extract
77 ; CHECK: vmov.f32 s0, s12
80 ; pass in memory, no memory/regs split
81 define dso_local float @f2_1(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, float %x, %struct.S2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
83 %s.coerce.fca.0.0.extract = extractvalue %struct.S2 %s.coerce, 0, 0
84 ret float %s.coerce.fca.0.0.extract
87 ; CHECK: vldr s0, [sp]
90 ; pass in memory, alignment 8
91 define dso_local float @f2_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.S2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
93 %s.coerce.fca.0.0.extract = extractvalue %struct.S2 %s.coerce, 0, 0
94 ret float %s.coerce.fca.0.0.extract
97 ; CHECK: vldr s0, [sp, #8]
101 define dso_local double @g0_0(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, %struct.D0 %s.coerce) local_unnamed_addr #0 {
103 %s.coerce.fca.0.0.extract = extractvalue %struct.D0 %s.coerce, 0, 0
104 ret double %s.coerce.fca.0.0.extract
107 ; CHECK: vmov.f64 d0, d6
110 ; pass in memory, no memory/regs split
111 define dso_local double @g0_1(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, %struct.D0 %s.coerce) local_unnamed_addr #0 {
113 %s.coerce.fca.0.0.extract = extractvalue %struct.D0 %s.coerce, 0, 0
114 ret double %s.coerce.fca.0.0.extract
117 ; CHECK: vldr d0, [sp]
120 ; pass in memory, alignment 8
121 define dso_local double @g0_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.D0 %s.coerce) local_unnamed_addr #0 {
123 %s.coerce.fca.0.0.extract = extractvalue %struct.D0 %s.coerce, 0, 0
124 ret double %s.coerce.fca.0.0.extract
127 ; CHECK: vldr d0, [sp, #8]
131 define dso_local double @g1_0(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, %struct.D1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
133 %s.coerce.fca.0.0.extract = extractvalue %struct.D1 %s.coerce, 0, 0
134 ret double %s.coerce.fca.0.0.extract
137 ; CHECK: vmov.f64 d0, d6
140 ; pass in memory, no memory/regs split
141 define dso_local double @g1_1(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, %struct.D1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
143 %s.coerce.fca.0.0.extract = extractvalue %struct.D1 %s.coerce, 0, 0
144 ret double %s.coerce.fca.0.0.extract
147 ; CHECK: vldr d0, [sp]
150 ; pass in memory, alignment 8
151 define dso_local double @g1_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.D1 alignstack(8) %s.coerce) local_unnamed_addr #0 {
153 %s.coerce.fca.0.0.extract = extractvalue %struct.D1 %s.coerce, 0, 0
154 ret double %s.coerce.fca.0.0.extract
157 ; CHECK: vldr d0, [sp, #8]
161 define dso_local double @g2_0(double %d0, double %d1, double %d2, double %d3, %struct.D2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
163 %s.coerce.fca.0.0.extract = extractvalue %struct.D2 %s.coerce, 0, 0
164 ret double %s.coerce.fca.0.0.extract
167 ; CHECK: vmov.f64 d0, d4
170 ; pass in memory, no memory/regs split
171 define dso_local double @g2_1(double %d0, double %d1, double %d2, double %d3, double %d4, %struct.D2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
173 %s.coerce.fca.0.0.extract = extractvalue %struct.D2 %s.coerce, 0, 0
174 ret double %s.coerce.fca.0.0.extract
177 ; CHECK: vldr d0, [sp]
180 ; pass in memory, alignment 8
181 define dso_local double @g2_2(double %d0, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, float %x, %struct.D2 alignstack(8) %s.coerce) local_unnamed_addr #0 {
183 %s.coerce.fca.0.0.extract = extractvalue %struct.D2 %s.coerce, 0, 0
184 ret double %s.coerce.fca.0.0.extract
187 ; CHECK: vldr d0, [sp, #8]
190 attributes #0 = { "target-cpu"="generic" "target-features"="+armv7-a,+d32,+dsp,+fp64,+neon,+strict-align,+vfp2,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,-thumb-mode" }