• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mips < %s | FileCheck %s
2
3; FIXME: Disabled because it unpredictably fails on certain platforms.
4; REQUIRES: disabled
5
6; $f12, $f14
7; CHECK: ldc1 $f12, %lo
8; CHECK: ldc1 $f14, %lo
9define void @testlowercall0() nounwind {
10entry:
11  tail call void @f0(double 5.000000e+00, double 6.000000e+00) nounwind
12  ret void
13}
14
15declare void @f0(double, double)
16
17; $f12, $f14
18; CHECK: lwc1 $f12, %lo
19; CHECK: lwc1 $f14, %lo
20define void @testlowercall1() nounwind {
21entry:
22  tail call void @f1(float 8.000000e+00, float 9.000000e+00) nounwind
23  ret void
24}
25
26declare void @f1(float, float)
27
28; $f12, $f14
29; CHECK: lwc1 $f12, %lo
30; CHECK: ldc1 $f14, %lo
31define void @testlowercall2() nounwind {
32entry:
33  tail call void @f2(float 8.000000e+00, double 6.000000e+00) nounwind
34  ret void
35}
36
37declare void @f2(float, double)
38
39; $f12, $f14
40; CHECK: ldc1 $f12, %lo
41; CHECK: lwc1 $f14, %lo
42define void @testlowercall3() nounwind {
43entry:
44  tail call void @f3(double 5.000000e+00, float 9.000000e+00) nounwind
45  ret void
46}
47
48declare void @f3(double, float)
49
50; $4, $5, $6, $7
51; CHECK: addiu $4, $zero, 12
52; CHECK: addiu $5, $zero, 13
53; CHECK: addiu $6, $zero, 14
54; CHECK: addiu $7, $zero, 15
55define void @testlowercall4() nounwind {
56entry:
57  tail call void @f4(i32 12, i32 13, i32 14, i32 15) nounwind
58  ret void
59}
60
61declare void @f4(i32, i32, i32, i32)
62
63; $f12, $6, stack
64; CHECK: sw
65; CHECK: sw
66; CHECK: ldc1 $f12, %lo
67; CHECK: addiu $6, $zero, 23
68define void @testlowercall5() nounwind {
69entry:
70  tail call void @f5(double 1.500000e+01, i32 23, double 1.700000e+01) nounwind
71  ret void
72}
73
74declare void @f5(double, i32, double)
75
76; $f12, $6, $7
77; CHECK: ldc1 $f12, %lo
78; CHECK: addiu $6, $zero, 33
79; CHECK: addiu $7, $zero, 24
80define void @testlowercall6() nounwind {
81entry:
82  tail call void @f6(double 2.500000e+01, i32 33, i32 24) nounwind
83  ret void
84}
85
86declare void @f6(double, i32, i32)
87
88; $f12, $5, $6
89; CHECK: lwc1 $f12, %lo
90; CHECK: addiu $5, $zero, 43
91; CHECK: addiu $6, $zero, 34
92define void @testlowercall7() nounwind {
93entry:
94  tail call void @f7(float 1.800000e+01, i32 43, i32 34) nounwind
95  ret void
96}
97
98declare void @f7(float, i32, i32)
99
100; $4, $5, $6, stack
101; CHECK: sw
102; CHECK: sw
103; CHECK: addiu $4, $zero, 22
104; CHECK: addiu $5, $zero, 53
105; CHECK: addiu $6, $zero, 44
106define void @testlowercall8() nounwind {
107entry:
108  tail call void @f8(i32 22, i32 53, i32 44, double 4.000000e+00) nounwind
109  ret void
110}
111
112declare void @f8(i32, i32, i32, double)
113
114; $4, $5, $6, $7
115; CHECK: addiu $4, $zero, 32
116; CHECK: addiu $5, $zero, 63
117; CHECK: addiu $6, $zero, 54
118; CHECK: ori $7
119define void @testlowercall9() nounwind {
120entry:
121  tail call void @f9(i32 32, i32 63, i32 54, float 1.100000e+01) nounwind
122  ret void
123}
124
125declare void @f9(i32, i32, i32, float)
126
127; $4, $5, ($6, $7)
128; CHECK: addiu $4, $zero, 42
129; CHECK: addiu $5, $zero, 73
130; CHECK: addiu $6, $zero, 0
131; CHECK: ori $7
132define void @testlowercall10() nounwind {
133entry:
134  tail call void @f10(i32 42, i32 73, double 2.700000e+01) nounwind
135  ret void
136}
137
138declare void @f10(i32, i32, double)
139
140; $4, ($6, $7)
141; CHECK: addiu $4, $zero, 52
142; CHECK: addiu $6, $zero, 0
143; CHECK: ori $7
144define void @testlowercall11() nounwind {
145entry:
146  tail call void @f11(i32 52, double 1.600000e+01) nounwind
147  ret void
148}
149
150declare void @f11(i32, double)
151
152; $f12, $f14, $6, $7
153; CHECK: lwc1 $f12, %lo
154; CHECK: lwc1 $f14, %lo
155; CHECK: ori $6
156; CHECK: ori $7
157define void @testlowercall12() nounwind {
158entry:
159  tail call void @f12(float 2.800000e+01, float 1.900000e+01, float 1.000000e+01, float 2.100000e+01) nounwind
160  ret void
161}
162
163declare void @f12(float, float, float, float)
164
165; $f12, $5, $6, $7
166; CHECK: lwc1 $f12, %lo
167; CHECK: addiu $5, $zero, 83
168; CHECK: ori $6
169; CHECK: addiu $7, $zero, 25
170define void @testlowercall13() nounwind {
171entry:
172  tail call void @f13(float 3.800000e+01, i32 83, float 2.000000e+01, i32 25) nounwind
173  ret void
174}
175
176
177declare void @f13(float, i32, float, i32)
178
179; $f12, $f14, $7
180; CHECK: ldc1 $f12, %lo
181; CHECK: lwc1 $f14, %lo
182; CHECK: ori $7
183define void @testlowercall14() nounwind {
184entry:
185  tail call void @f14(double 3.500000e+01, float 2.900000e+01, float 3.000000e+01) nounwind
186  ret void
187}
188
189declare void @f14(double, float, float)
190
191; $f12, $f14, ($6, $7)
192; CHECK: lwc1 $f12, %lo
193; CHECK: lwc1 $f14, %lo
194; CHECK: addiu $6, $zero, 0
195; CHECK: ori $7
196define void @testlowercall15() nounwind {
197entry:
198  tail call void @f15(float 4.800000e+01, float 3.900000e+01, double 3.700000e+01) nounwind
199  ret void
200}
201
202declare void @f15(float, float, double)
203
204; $4, $5, $6, $7
205; CHECK: addiu $4, $zero, 62
206; CHECK: ori $5
207; CHECK: addiu $6, $zero, 64
208; CHECK: ori $7
209define void @testlowercall16() nounwind {
210entry:
211  tail call void @f16(i32 62, float 4.900000e+01, i32 64, float 3.100000e+01) nounwind
212  ret void
213}
214
215declare void @f16(i32, float, i32, float)
216
217; $4, $5, $6, $7
218; CHECK: addiu $4, $zero, 72
219; CHECK: ori $5
220; CHECK: addiu $6, $zero, 74
221; CHECK: addiu $7, $zero, 35
222define void @testlowercall17() nounwind {
223entry:
224  tail call void @f17(i32 72, float 5.900000e+01, i32 74, i32 35) nounwind
225  ret void
226}
227
228declare void @f17(i32, float, i32, i32)
229
230; $4, $5, $6, $7
231; CHECK: addiu $4, $zero, 82
232; CHECK: addiu $5, $zero, 93
233; CHECK: ori $6
234; CHECK: addiu $7, $zero, 45
235define void @testlowercall18() nounwind {
236entry:
237  tail call void @f18(i32 82, i32 93, float 4.000000e+01, i32 45) nounwind
238  ret void
239}
240
241declare void @f18(i32, i32, float, i32)
242
243
244; $4, ($6, $7), stack
245; CHECK: sw
246; CHECK: sw
247; CHECK: addiu $4, $zero, 92
248; CHECK: addiu $6, $zero, 0
249; CHECK: ori $7
250define void @testlowercall20() nounwind {
251entry:
252  tail call void @f20(i32 92, double 2.600000e+01, double 4.700000e+01) nounwind
253  ret void
254}
255
256declare void @f20(i32, double, double)
257
258; $f12, $5
259; CHECK: lwc1 $f12, %lo
260; CHECK: addiu $5, $zero, 103
261define void @testlowercall21() nounwind {
262entry:
263  tail call void @f21(float 5.800000e+01, i32 103) nounwind
264  ret void
265}
266
267declare void @f21(float, i32)
268
269; $f12, $5, ($6, $7)
270; CHECK: lwc1 $f12, %lo
271; CHECK: addiu $5, $zero, 113
272; CHECK: addiu $6, $zero, 0
273; CHECK: ori $7
274define void @testlowercall22() nounwind {
275entry:
276  tail call void @f22(float 6.800000e+01, i32 113, double 5.700000e+01) nounwind
277  ret void
278}
279
280declare void @f22(float, i32, double)
281
282; $f12, f6
283; CHECK: ldc1 $f12, %lo
284; CHECK: addiu $6, $zero, 123
285define void @testlowercall23() nounwind {
286entry:
287  tail call void @f23(double 4.500000e+01, i32 123) nounwind
288  ret void
289}
290
291declare void @f23(double, i32)
292
293; $f12,$6, stack
294; CHECK: sw
295; CHECK: sw
296; CHECK: ldc1 $f12, %lo
297; CHECK: addiu $6, $zero, 133
298define void @testlowercall24() nounwind {
299entry:
300  tail call void @f24(double 5.500000e+01, i32 133, double 6.700000e+01) nounwind
301  ret void
302}
303
304declare void @f24(double, i32, double)
305
306; CHECK: lwc1 $f12, %lo
307; lwc1 $f12, %lo
308; CHECK: lwc1 $f14, %lo
309; CHECK: ori $6
310; CHECK: ori $7
311; CHECK: lwc1 $f12, %lo
312; CHECK: addiu $5, $zero, 83
313; CHECK: ori $6
314; CHECK: addiu $7, $zero, 25
315; CHECK: addiu $4, $zero, 82
316; CHECK: addiu $5, $zero, 93
317; CHECK: ori $6
318; CHECK: addiu $7, $zero, 45
319define void @testlowercall25() nounwind {
320entry:
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
324  ret void
325}
326