1 ; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
3 ; FIXME: Disabled because it unpredictably fails on certain platforms.
7 ; CHECK: ldc1 $f12, %lo
8 ; CHECK: ldc1 $f14, %lo
9 define void @testlowercall0() nounwind {
11 tail call void @f0(double 5.000000e+00, double 6.000000e+00) nounwind
15 declare void @f0(double, double)
18 ; CHECK: lwc1 $f12, %lo
19 ; CHECK: lwc1 $f14, %lo
20 define void @testlowercall1() nounwind {
22 tail call void @f1(float 8.000000e+00, float 9.000000e+00) nounwind
26 declare void @f1(float, float)
29 ; CHECK: lwc1 $f12, %lo
30 ; CHECK: ldc1 $f14, %lo
31 define void @testlowercall2() nounwind {
33 tail call void @f2(float 8.000000e+00, double 6.000000e+00) nounwind
37 declare void @f2(float, double)
40 ; CHECK: ldc1 $f12, %lo
41 ; CHECK: lwc1 $f14, %lo
42 define void @testlowercall3() nounwind {
44 tail call void @f3(double 5.000000e+00, float 9.000000e+00) nounwind
48 declare void @f3(double, float)
51 ; CHECK: addiu $4, $zero, 12
52 ; CHECK: addiu $5, $zero, 13
53 ; CHECK: addiu $6, $zero, 14
54 ; CHECK: addiu $7, $zero, 15
55 define void @testlowercall4() nounwind {
57 tail call void @f4(i32 12, i32 13, i32 14, i32 15) nounwind
61 declare void @f4(i32, i32, i32, i32)
66 ; CHECK: ldc1 $f12, %lo
67 ; CHECK: addiu $6, $zero, 23
68 define void @testlowercall5() nounwind {
70 tail call void @f5(double 1.500000e+01, i32 23, double 1.700000e+01) nounwind
74 declare void @f5(double, i32, double)
77 ; CHECK: ldc1 $f12, %lo
78 ; CHECK: addiu $6, $zero, 33
79 ; CHECK: addiu $7, $zero, 24
80 define void @testlowercall6() nounwind {
82 tail call void @f6(double 2.500000e+01, i32 33, i32 24) nounwind
86 declare void @f6(double, i32, i32)
89 ; CHECK: lwc1 $f12, %lo
90 ; CHECK: addiu $5, $zero, 43
91 ; CHECK: addiu $6, $zero, 34
92 define void @testlowercall7() nounwind {
94 tail call void @f7(float 1.800000e+01, i32 43, i32 34) nounwind
98 declare void @f7(float, i32, i32)
103 ; CHECK: addiu $4, $zero, 22
104 ; CHECK: addiu $5, $zero, 53
105 ; CHECK: addiu $6, $zero, 44
106 define void @testlowercall8() nounwind {
108 tail call void @f8(i32 22, i32 53, i32 44, double 4.000000e+00) nounwind
112 declare void @f8(i32, i32, i32, double)
115 ; CHECK: addiu $4, $zero, 32
116 ; CHECK: addiu $5, $zero, 63
117 ; CHECK: addiu $6, $zero, 54
119 define void @testlowercall9() nounwind {
121 tail call void @f9(i32 32, i32 63, i32 54, float 1.100000e+01) nounwind
125 declare void @f9(i32, i32, i32, float)
128 ; CHECK: addiu $4, $zero, 42
129 ; CHECK: addiu $5, $zero, 73
130 ; CHECK: addiu $6, $zero, 0
132 define void @testlowercall10() nounwind {
134 tail call void @f10(i32 42, i32 73, double 2.700000e+01) nounwind
138 declare void @f10(i32, i32, double)
141 ; CHECK: addiu $4, $zero, 52
142 ; CHECK: addiu $6, $zero, 0
144 define void @testlowercall11() nounwind {
146 tail call void @f11(i32 52, double 1.600000e+01) nounwind
150 declare void @f11(i32, double)
153 ; CHECK: lwc1 $f12, %lo
154 ; CHECK: lwc1 $f14, %lo
157 define void @testlowercall12() nounwind {
159 tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
163 declare void @f12(float, float, float, float)
166 ; CHECK: lwc1 $f12, %lo
167 ; CHECK: addiu $5, $zero, 83
169 ; CHECK: addiu $7, $zero, 25
170 define void @testlowercall13() nounwind {
172 tail call void @f13(float 3.800000e+01, i32 83, float 2.000000e+01, i32 25) nounwind
177 declare void @f13(float, i32, float, i32)
180 ; CHECK: ldc1 $f12, %lo
181 ; CHECK: lwc1 $f14, %lo
183 define void @testlowercall14() nounwind {
185 tail call void @f14(double 3.500000e+01, float 2.900000e+01, float 3.000000e+01) nounwind
189 declare void @f14(double, float, float)
191 ; $f12, $f14, ($6, $7)
192 ; CHECK: lwc1 $f12, %lo
193 ; CHECK: lwc1 $f14, %lo
194 ; CHECK: addiu $6, $zero, 0
196 define void @testlowercall15() nounwind {
198 tail call void @f15(float 4.800000e+01, float 3.900000e+01, double 3.700000e+01) nounwind
202 declare void @f15(float, float, double)
205 ; CHECK: addiu $4, $zero, 62
207 ; CHECK: addiu $6, $zero, 64
209 define void @testlowercall16() nounwind {
211 tail call void @f16(i32 62, float 4.900000e+01, i32 64, float 3.100000e+01) nounwind
215 declare void @f16(i32, float, i32, float)
218 ; CHECK: addiu $4, $zero, 72
220 ; CHECK: addiu $6, $zero, 74
221 ; CHECK: addiu $7, $zero, 35
222 define void @testlowercall17() nounwind {
224 tail call void @f17(i32 72, float 5.900000e+01, i32 74, i32 35) nounwind
228 declare void @f17(i32, float, i32, i32)
231 ; CHECK: addiu $4, $zero, 82
232 ; CHECK: addiu $5, $zero, 93
234 ; CHECK: addiu $7, $zero, 45
235 define void @testlowercall18() nounwind {
237 tail call void @f18(i32 82, i32 93, float 4.000000e+01, i32 45) nounwind
241 declare void @f18(i32, i32, float, i32)
244 ; $4, ($6, $7), stack
247 ; CHECK: addiu $4, $zero, 92
248 ; CHECK: addiu $6, $zero, 0
250 define void @testlowercall20() nounwind {
252 tail call void @f20(i32 92, double 2.600000e+01, double 4.700000e+01) nounwind
256 declare void @f20(i32, double, double)
259 ; CHECK: lwc1 $f12, %lo
260 ; CHECK: addiu $5, $zero, 103
261 define void @testlowercall21() nounwind {
263 tail call void @f21(float 5.800000e+01, i32 103) nounwind
267 declare void @f21(float, i32)
270 ; CHECK: lwc1 $f12, %lo
271 ; CHECK: addiu $5, $zero, 113
272 ; CHECK: addiu $6, $zero, 0
274 define void @testlowercall22() nounwind {
276 tail call void @f22(float 6.800000e+01, i32 113, double 5.700000e+01) nounwind
280 declare void @f22(float, i32, double)
283 ; CHECK: ldc1 $f12, %lo
284 ; CHECK: addiu $6, $zero, 123
285 define void @testlowercall23() nounwind {
287 tail call void @f23(double 4.500000e+01, i32 123) nounwind
291 declare void @f23(double, i32)
296 ; CHECK: ldc1 $f12, %lo
297 ; CHECK: addiu $6, $zero, 133
298 define void @testlowercall24() nounwind {
300 tail call void @f24(double 5.500000e+01, i32 133, double 6.700000e+01) nounwind
304 declare void @f24(double, i32, double)
306 ; CHECK: lwc1 $f12, %lo
308 ; CHECK: lwc1 $f14, %lo
311 ; CHECK: lwc1 $f12, %lo
312 ; CHECK: addiu $5, $zero, 83
314 ; CHECK: addiu $7, $zero, 25
315 ; CHECK: addiu $4, $zero, 82
316 ; CHECK: addiu $5, $zero, 93
318 ; CHECK: addiu $7, $zero, 45
319 define void @testlowercall25() nounwind {
321 tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
322 tail call void @f13(float 3.800000e+01, i32 83, float 2.000000e+01, i32 25) nounwind
323 tail call void @f18(i32 82, i32 93, float 4.000000e+01, i32 45) nounwind