1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-unknown | FileCheck %s --check-prefixes=X86,X86-X87
3 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X64,X64-X87
4 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ssse3 | FileCheck %s --check-prefixes=X64,X64-SSSE3
10 define i16 @fptosi_i16_fp80(x86_fp80 %a0) nounwind {
11 ; X86-LABEL: fptosi_i16_fp80:
13 ; X86-NEXT: subl $8, %esp
14 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
15 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
16 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
17 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
18 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
19 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
20 ; X86-NEXT: fistps {{[0-9]+}}(%esp)
21 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
22 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
23 ; X86-NEXT: addl $8, %esp
26 ; X64-X87-LABEL: fptosi_i16_fp80:
28 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
29 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
30 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
31 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
32 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
33 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
34 ; X64-X87-NEXT: fistps -{{[0-9]+}}(%rsp)
35 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
36 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
39 ; X64-SSSE3-LABEL: fptosi_i16_fp80:
41 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
42 ; X64-SSSE3-NEXT: fisttps -{{[0-9]+}}(%rsp)
43 ; X64-SSSE3-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
44 ; X64-SSSE3-NEXT: retq
45 %1 = fptosi x86_fp80 %a0 to i16
49 define i16 @fptosi_i16_fp80_ld(x86_fp80 *%a0) nounwind {
50 ; X86-LABEL: fptosi_i16_fp80_ld:
52 ; X86-NEXT: subl $8, %esp
53 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
54 ; X86-NEXT: fldt (%eax)
55 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
56 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
57 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
58 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
59 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
60 ; X86-NEXT: fistps {{[0-9]+}}(%esp)
61 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
62 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
63 ; X86-NEXT: addl $8, %esp
66 ; X64-X87-LABEL: fptosi_i16_fp80_ld:
68 ; X64-X87-NEXT: fldt (%rdi)
69 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
70 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
71 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
72 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
73 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
74 ; X64-X87-NEXT: fistps -{{[0-9]+}}(%rsp)
75 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
76 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
79 ; X64-SSSE3-LABEL: fptosi_i16_fp80_ld:
81 ; X64-SSSE3-NEXT: fldt (%rdi)
82 ; X64-SSSE3-NEXT: fisttps -{{[0-9]+}}(%rsp)
83 ; X64-SSSE3-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
84 ; X64-SSSE3-NEXT: retq
85 %1 = load x86_fp80, x86_fp80 *%a0
86 %2 = fptosi x86_fp80 %1 to i16
90 define i32 @fptosi_i32_fp80(x86_fp80 %a0) nounwind {
91 ; X86-LABEL: fptosi_i32_fp80:
93 ; X86-NEXT: subl $8, %esp
94 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
95 ; X86-NEXT: fnstcw (%esp)
96 ; X86-NEXT: movzwl (%esp), %eax
97 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
98 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
99 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
100 ; X86-NEXT: fistpl {{[0-9]+}}(%esp)
101 ; X86-NEXT: fldcw (%esp)
102 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
103 ; X86-NEXT: addl $8, %esp
106 ; X64-X87-LABEL: fptosi_i32_fp80:
108 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
109 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
110 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
111 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
112 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
113 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
114 ; X64-X87-NEXT: fistpl -{{[0-9]+}}(%rsp)
115 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
116 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
119 ; X64-SSSE3-LABEL: fptosi_i32_fp80:
120 ; X64-SSSE3: # %bb.0:
121 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
122 ; X64-SSSE3-NEXT: fisttpl -{{[0-9]+}}(%rsp)
123 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
124 ; X64-SSSE3-NEXT: retq
125 %1 = fptosi x86_fp80 %a0 to i32
129 define i32 @fptosi_i32_fp80_ld(x86_fp80 *%a0) nounwind {
130 ; X86-LABEL: fptosi_i32_fp80_ld:
132 ; X86-NEXT: subl $8, %esp
133 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
134 ; X86-NEXT: fldt (%eax)
135 ; X86-NEXT: fnstcw (%esp)
136 ; X86-NEXT: movzwl (%esp), %eax
137 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
138 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
139 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
140 ; X86-NEXT: fistpl {{[0-9]+}}(%esp)
141 ; X86-NEXT: fldcw (%esp)
142 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
143 ; X86-NEXT: addl $8, %esp
146 ; X64-X87-LABEL: fptosi_i32_fp80_ld:
148 ; X64-X87-NEXT: fldt (%rdi)
149 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
150 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
151 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
152 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
153 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
154 ; X64-X87-NEXT: fistpl -{{[0-9]+}}(%rsp)
155 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
156 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
159 ; X64-SSSE3-LABEL: fptosi_i32_fp80_ld:
160 ; X64-SSSE3: # %bb.0:
161 ; X64-SSSE3-NEXT: fldt (%rdi)
162 ; X64-SSSE3-NEXT: fisttpl -{{[0-9]+}}(%rsp)
163 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
164 ; X64-SSSE3-NEXT: retq
165 %1 = load x86_fp80, x86_fp80 *%a0
166 %2 = fptosi x86_fp80 %1 to i32
170 define i64 @fptosi_i64_fp80(x86_fp80 %a0) nounwind {
171 ; X86-LABEL: fptosi_i64_fp80:
173 ; X86-NEXT: pushl %ebp
174 ; X86-NEXT: movl %esp, %ebp
175 ; X86-NEXT: andl $-8, %esp
176 ; X86-NEXT: subl $16, %esp
177 ; X86-NEXT: fldt 8(%ebp)
178 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
179 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
180 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
181 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
182 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
183 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
184 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
185 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
186 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
187 ; X86-NEXT: movl %ebp, %esp
188 ; X86-NEXT: popl %ebp
191 ; X64-X87-LABEL: fptosi_i64_fp80:
193 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
194 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
195 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
196 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
197 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
198 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
199 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
200 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
201 ; X64-X87-NEXT: movq -{{[0-9]+}}(%rsp), %rax
204 ; X64-SSSE3-LABEL: fptosi_i64_fp80:
205 ; X64-SSSE3: # %bb.0:
206 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
207 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
208 ; X64-SSSE3-NEXT: movq -{{[0-9]+}}(%rsp), %rax
209 ; X64-SSSE3-NEXT: retq
210 %1 = fptosi x86_fp80 %a0 to i64
214 define i64 @fptosi_i64_fp80_ld(x86_fp80 *%a0) nounwind {
215 ; X86-LABEL: fptosi_i64_fp80_ld:
217 ; X86-NEXT: pushl %ebp
218 ; X86-NEXT: movl %esp, %ebp
219 ; X86-NEXT: andl $-8, %esp
220 ; X86-NEXT: subl $16, %esp
221 ; X86-NEXT: movl 8(%ebp), %eax
222 ; X86-NEXT: fldt (%eax)
223 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
224 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
225 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
226 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
227 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
228 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
229 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
230 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
231 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
232 ; X86-NEXT: movl %ebp, %esp
233 ; X86-NEXT: popl %ebp
236 ; X64-X87-LABEL: fptosi_i64_fp80_ld:
238 ; X64-X87-NEXT: fldt (%rdi)
239 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
240 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
241 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
242 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
243 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
244 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
245 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
246 ; X64-X87-NEXT: movq -{{[0-9]+}}(%rsp), %rax
249 ; X64-SSSE3-LABEL: fptosi_i64_fp80_ld:
250 ; X64-SSSE3: # %bb.0:
251 ; X64-SSSE3-NEXT: fldt (%rdi)
252 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
253 ; X64-SSSE3-NEXT: movq -{{[0-9]+}}(%rsp), %rax
254 ; X64-SSSE3-NEXT: retq
255 %1 = load x86_fp80, x86_fp80 *%a0
256 %2 = fptosi x86_fp80 %1 to i64
264 define i16 @fptoui_i16_fp80(x86_fp80 %a0) nounwind {
265 ; X86-LABEL: fptoui_i16_fp80:
267 ; X86-NEXT: subl $8, %esp
268 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
269 ; X86-NEXT: fnstcw (%esp)
270 ; X86-NEXT: movzwl (%esp), %eax
271 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
272 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
273 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
274 ; X86-NEXT: fistpl {{[0-9]+}}(%esp)
275 ; X86-NEXT: fldcw (%esp)
276 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
277 ; X86-NEXT: # kill: def $ax killed $ax killed $eax
278 ; X86-NEXT: addl $8, %esp
281 ; X64-X87-LABEL: fptoui_i16_fp80:
283 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
284 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
285 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
286 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
287 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
288 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
289 ; X64-X87-NEXT: fistpl -{{[0-9]+}}(%rsp)
290 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
291 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
292 ; X64-X87-NEXT: # kill: def $ax killed $ax killed $eax
295 ; X64-SSSE3-LABEL: fptoui_i16_fp80:
296 ; X64-SSSE3: # %bb.0:
297 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
298 ; X64-SSSE3-NEXT: fisttpl -{{[0-9]+}}(%rsp)
299 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
300 ; X64-SSSE3-NEXT: # kill: def $ax killed $ax killed $eax
301 ; X64-SSSE3-NEXT: retq
302 %1 = fptoui x86_fp80 %a0 to i16
306 define i16 @fptoui_i16_fp80_ld(x86_fp80 *%a0) nounwind {
307 ; X86-LABEL: fptoui_i16_fp80_ld:
309 ; X86-NEXT: subl $8, %esp
310 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
311 ; X86-NEXT: fldt (%eax)
312 ; X86-NEXT: fnstcw (%esp)
313 ; X86-NEXT: movzwl (%esp), %eax
314 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
315 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
316 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
317 ; X86-NEXT: fistpl {{[0-9]+}}(%esp)
318 ; X86-NEXT: fldcw (%esp)
319 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
320 ; X86-NEXT: # kill: def $ax killed $ax killed $eax
321 ; X86-NEXT: addl $8, %esp
324 ; X64-X87-LABEL: fptoui_i16_fp80_ld:
326 ; X64-X87-NEXT: fldt (%rdi)
327 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
328 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
329 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
330 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
331 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
332 ; X64-X87-NEXT: fistpl -{{[0-9]+}}(%rsp)
333 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
334 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
335 ; X64-X87-NEXT: # kill: def $ax killed $ax killed $eax
338 ; X64-SSSE3-LABEL: fptoui_i16_fp80_ld:
339 ; X64-SSSE3: # %bb.0:
340 ; X64-SSSE3-NEXT: fldt (%rdi)
341 ; X64-SSSE3-NEXT: fisttpl -{{[0-9]+}}(%rsp)
342 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
343 ; X64-SSSE3-NEXT: # kill: def $ax killed $ax killed $eax
344 ; X64-SSSE3-NEXT: retq
345 %1 = load x86_fp80, x86_fp80 *%a0
346 %2 = fptoui x86_fp80 %1 to i16
350 define i32 @fptoui_i32_fp80(x86_fp80 %a0) nounwind {
351 ; X86-LABEL: fptoui_i32_fp80:
353 ; X86-NEXT: pushl %ebp
354 ; X86-NEXT: movl %esp, %ebp
355 ; X86-NEXT: andl $-8, %esp
356 ; X86-NEXT: subl $16, %esp
357 ; X86-NEXT: fldt 8(%ebp)
358 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
359 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
360 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
361 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
362 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
363 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
364 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
365 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
366 ; X86-NEXT: movl %ebp, %esp
367 ; X86-NEXT: popl %ebp
370 ; X64-X87-LABEL: fptoui_i32_fp80:
372 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
373 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
374 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
375 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
376 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
377 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
378 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
379 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
380 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
383 ; X64-SSSE3-LABEL: fptoui_i32_fp80:
384 ; X64-SSSE3: # %bb.0:
385 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
386 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
387 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
388 ; X64-SSSE3-NEXT: retq
389 %1 = fptoui x86_fp80 %a0 to i32
393 define i32 @fptoui_i32_fp80_ld(x86_fp80 *%a0) nounwind {
394 ; X86-LABEL: fptoui_i32_fp80_ld:
396 ; X86-NEXT: pushl %ebp
397 ; X86-NEXT: movl %esp, %ebp
398 ; X86-NEXT: andl $-8, %esp
399 ; X86-NEXT: subl $16, %esp
400 ; X86-NEXT: movl 8(%ebp), %eax
401 ; X86-NEXT: fldt (%eax)
402 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
403 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
404 ; X86-NEXT: orl $3072, %eax # imm = 0xC00
405 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
406 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
407 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
408 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
409 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
410 ; X86-NEXT: movl %ebp, %esp
411 ; X86-NEXT: popl %ebp
414 ; X64-X87-LABEL: fptoui_i32_fp80_ld:
416 ; X64-X87-NEXT: fldt (%rdi)
417 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
418 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
419 ; X64-X87-NEXT: orl $3072, %eax # imm = 0xC00
420 ; X64-X87-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
421 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
422 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
423 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
424 ; X64-X87-NEXT: movl -{{[0-9]+}}(%rsp), %eax
427 ; X64-SSSE3-LABEL: fptoui_i32_fp80_ld:
428 ; X64-SSSE3: # %bb.0:
429 ; X64-SSSE3-NEXT: fldt (%rdi)
430 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
431 ; X64-SSSE3-NEXT: movl -{{[0-9]+}}(%rsp), %eax
432 ; X64-SSSE3-NEXT: retq
433 %1 = load x86_fp80, x86_fp80 *%a0
434 %2 = fptoui x86_fp80 %1 to i32
438 define i64 @fptoui_i64_fp80(x86_fp80 %a0) nounwind {
439 ; X86-LABEL: fptoui_i64_fp80:
441 ; X86-NEXT: pushl %ebp
442 ; X86-NEXT: movl %esp, %ebp
443 ; X86-NEXT: andl $-8, %esp
444 ; X86-NEXT: subl $16, %esp
445 ; X86-NEXT: fldt 8(%ebp)
446 ; X86-NEXT: flds {{\.LCPI.*}}
447 ; X86-NEXT: fld %st(1)
448 ; X86-NEXT: fsub %st(1), %st
449 ; X86-NEXT: fxch %st(1)
450 ; X86-NEXT: fucomp %st(2)
451 ; X86-NEXT: fnstsw %ax
452 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
454 ; X86-NEXT: ja .LBB10_2
456 ; X86-NEXT: fstp %st(1)
458 ; X86-NEXT: .LBB10_2:
459 ; X86-NEXT: fstp %st(0)
460 ; X86-NEXT: setbe %al
461 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
462 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
463 ; X86-NEXT: orl $3072, %ecx # imm = 0xC00
464 ; X86-NEXT: movw %cx, {{[0-9]+}}(%esp)
465 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
466 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
467 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
468 ; X86-NEXT: movzbl %al, %edx
469 ; X86-NEXT: shll $31, %edx
470 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %edx
471 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
472 ; X86-NEXT: movl %ebp, %esp
473 ; X86-NEXT: popl %ebp
476 ; X64-X87-LABEL: fptoui_i64_fp80:
478 ; X64-X87-NEXT: fldt {{[0-9]+}}(%rsp)
479 ; X64-X87-NEXT: flds {{.*}}(%rip)
480 ; X64-X87-NEXT: fld %st(1)
481 ; X64-X87-NEXT: fsub %st(1), %st
482 ; X64-X87-NEXT: xorl %eax, %eax
483 ; X64-X87-NEXT: fxch %st(1)
484 ; X64-X87-NEXT: fucompi %st(2), %st
485 ; X64-X87-NEXT: fcmovnbe %st(1), %st
486 ; X64-X87-NEXT: fstp %st(1)
487 ; X64-X87-NEXT: setbe %al
488 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
489 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %ecx
490 ; X64-X87-NEXT: orl $3072, %ecx # imm = 0xC00
491 ; X64-X87-NEXT: movw %cx, -{{[0-9]+}}(%rsp)
492 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
493 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
494 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
495 ; X64-X87-NEXT: shlq $63, %rax
496 ; X64-X87-NEXT: xorq -{{[0-9]+}}(%rsp), %rax
499 ; X64-SSSE3-LABEL: fptoui_i64_fp80:
500 ; X64-SSSE3: # %bb.0:
501 ; X64-SSSE3-NEXT: fldt {{[0-9]+}}(%rsp)
502 ; X64-SSSE3-NEXT: flds {{.*}}(%rip)
503 ; X64-SSSE3-NEXT: fld %st(1)
504 ; X64-SSSE3-NEXT: fsub %st(1), %st
505 ; X64-SSSE3-NEXT: xorl %eax, %eax
506 ; X64-SSSE3-NEXT: fxch %st(1)
507 ; X64-SSSE3-NEXT: fucompi %st(2), %st
508 ; X64-SSSE3-NEXT: fcmovnbe %st(1), %st
509 ; X64-SSSE3-NEXT: fstp %st(1)
510 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
511 ; X64-SSSE3-NEXT: setbe %al
512 ; X64-SSSE3-NEXT: shlq $63, %rax
513 ; X64-SSSE3-NEXT: xorq -{{[0-9]+}}(%rsp), %rax
514 ; X64-SSSE3-NEXT: retq
515 %1 = fptoui x86_fp80 %a0 to i64
519 define i64 @fptoui_i64_fp80_ld(x86_fp80 *%a0) nounwind {
520 ; X86-LABEL: fptoui_i64_fp80_ld:
522 ; X86-NEXT: pushl %ebp
523 ; X86-NEXT: movl %esp, %ebp
524 ; X86-NEXT: andl $-8, %esp
525 ; X86-NEXT: subl $16, %esp
526 ; X86-NEXT: movl 8(%ebp), %eax
527 ; X86-NEXT: fldt (%eax)
528 ; X86-NEXT: flds {{\.LCPI.*}}
529 ; X86-NEXT: fld %st(1)
530 ; X86-NEXT: fsub %st(1), %st
531 ; X86-NEXT: fxch %st(1)
532 ; X86-NEXT: fucomp %st(2)
533 ; X86-NEXT: fnstsw %ax
534 ; X86-NEXT: # kill: def $ah killed $ah killed $ax
536 ; X86-NEXT: ja .LBB11_2
538 ; X86-NEXT: fstp %st(1)
540 ; X86-NEXT: .LBB11_2:
541 ; X86-NEXT: fstp %st(0)
542 ; X86-NEXT: setbe %al
543 ; X86-NEXT: fnstcw {{[0-9]+}}(%esp)
544 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
545 ; X86-NEXT: orl $3072, %ecx # imm = 0xC00
546 ; X86-NEXT: movw %cx, {{[0-9]+}}(%esp)
547 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
548 ; X86-NEXT: fistpll {{[0-9]+}}(%esp)
549 ; X86-NEXT: fldcw {{[0-9]+}}(%esp)
550 ; X86-NEXT: movzbl %al, %edx
551 ; X86-NEXT: shll $31, %edx
552 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %edx
553 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
554 ; X86-NEXT: movl %ebp, %esp
555 ; X86-NEXT: popl %ebp
558 ; X64-X87-LABEL: fptoui_i64_fp80_ld:
560 ; X64-X87-NEXT: fldt (%rdi)
561 ; X64-X87-NEXT: flds {{.*}}(%rip)
562 ; X64-X87-NEXT: fld %st(1)
563 ; X64-X87-NEXT: fsub %st(1), %st
564 ; X64-X87-NEXT: xorl %eax, %eax
565 ; X64-X87-NEXT: fxch %st(1)
566 ; X64-X87-NEXT: fucompi %st(2), %st
567 ; X64-X87-NEXT: fcmovnbe %st(1), %st
568 ; X64-X87-NEXT: fstp %st(1)
569 ; X64-X87-NEXT: setbe %al
570 ; X64-X87-NEXT: fnstcw -{{[0-9]+}}(%rsp)
571 ; X64-X87-NEXT: movzwl -{{[0-9]+}}(%rsp), %ecx
572 ; X64-X87-NEXT: orl $3072, %ecx # imm = 0xC00
573 ; X64-X87-NEXT: movw %cx, -{{[0-9]+}}(%rsp)
574 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
575 ; X64-X87-NEXT: fistpll -{{[0-9]+}}(%rsp)
576 ; X64-X87-NEXT: fldcw -{{[0-9]+}}(%rsp)
577 ; X64-X87-NEXT: shlq $63, %rax
578 ; X64-X87-NEXT: xorq -{{[0-9]+}}(%rsp), %rax
581 ; X64-SSSE3-LABEL: fptoui_i64_fp80_ld:
582 ; X64-SSSE3: # %bb.0:
583 ; X64-SSSE3-NEXT: fldt (%rdi)
584 ; X64-SSSE3-NEXT: flds {{.*}}(%rip)
585 ; X64-SSSE3-NEXT: fld %st(1)
586 ; X64-SSSE3-NEXT: fsub %st(1), %st
587 ; X64-SSSE3-NEXT: xorl %eax, %eax
588 ; X64-SSSE3-NEXT: fxch %st(1)
589 ; X64-SSSE3-NEXT: fucompi %st(2), %st
590 ; X64-SSSE3-NEXT: fcmovnbe %st(1), %st
591 ; X64-SSSE3-NEXT: fstp %st(1)
592 ; X64-SSSE3-NEXT: fisttpll -{{[0-9]+}}(%rsp)
593 ; X64-SSSE3-NEXT: setbe %al
594 ; X64-SSSE3-NEXT: shlq $63, %rax
595 ; X64-SSSE3-NEXT: xorq -{{[0-9]+}}(%rsp), %rax
596 ; X64-SSSE3-NEXT: retq
597 %1 = load x86_fp80, x86_fp80 *%a0
598 %2 = fptoui x86_fp80 %1 to i64
606 define x86_fp80 @sitofp_fp80_i16(i16 %a0) nounwind {
607 ; X86-LABEL: sitofp_fp80_i16:
609 ; X86-NEXT: pushl %eax
610 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
611 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
612 ; X86-NEXT: filds {{[0-9]+}}(%esp)
613 ; X86-NEXT: popl %eax
616 ; X64-LABEL: sitofp_fp80_i16:
618 ; X64-NEXT: movswl %di, %eax
619 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
620 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
622 %1 = sitofp i16 %a0 to x86_fp80
626 define x86_fp80 @sitofp_fp80_i16_ld(i16 *%a0) nounwind {
627 ; X86-LABEL: sitofp_fp80_i16_ld:
629 ; X86-NEXT: pushl %eax
630 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
631 ; X86-NEXT: movzwl (%eax), %eax
632 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
633 ; X86-NEXT: filds {{[0-9]+}}(%esp)
634 ; X86-NEXT: popl %eax
637 ; X64-LABEL: sitofp_fp80_i16_ld:
639 ; X64-NEXT: movswl (%rdi), %eax
640 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
641 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
643 %1 = load i16, i16 *%a0
644 %2 = sitofp i16 %1 to x86_fp80
648 define x86_fp80 @sitofp_fp80_i32(i32 %a0) nounwind {
649 ; X86-LABEL: sitofp_fp80_i32:
651 ; X86-NEXT: pushl %eax
652 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
653 ; X86-NEXT: movl %eax, (%esp)
654 ; X86-NEXT: fildl (%esp)
655 ; X86-NEXT: popl %eax
658 ; X64-LABEL: sitofp_fp80_i32:
660 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
661 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
663 %1 = sitofp i32 %a0 to x86_fp80
667 define x86_fp80 @sitofp_fp80_i32_ld(i32 *%a0) nounwind {
668 ; X86-LABEL: sitofp_fp80_i32_ld:
670 ; X86-NEXT: pushl %eax
671 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
672 ; X86-NEXT: movl (%eax), %eax
673 ; X86-NEXT: movl %eax, (%esp)
674 ; X86-NEXT: fildl (%esp)
675 ; X86-NEXT: popl %eax
678 ; X64-LABEL: sitofp_fp80_i32_ld:
680 ; X64-NEXT: movl (%rdi), %eax
681 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
682 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
684 %1 = load i32, i32 *%a0
685 %2 = sitofp i32 %1 to x86_fp80
689 define x86_fp80 @sitofp_fp80_i64(i64 %a0) nounwind {
690 ; X86-LABEL: sitofp_fp80_i64:
692 ; X86-NEXT: fildll {{[0-9]+}}(%esp)
695 ; X64-LABEL: sitofp_fp80_i64:
697 ; X64-NEXT: movq %rdi, -{{[0-9]+}}(%rsp)
698 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
700 %1 = sitofp i64 %a0 to x86_fp80
704 define x86_fp80 @sitofp_fp80_i64_ld(i64 *%a0) nounwind {
705 ; X86-LABEL: sitofp_fp80_i64_ld:
707 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
708 ; X86-NEXT: fildll (%eax)
711 ; X64-LABEL: sitofp_fp80_i64_ld:
713 ; X64-NEXT: movq (%rdi), %rax
714 ; X64-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
715 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
717 %1 = load i64, i64 *%a0
718 %2 = sitofp i64 %1 to x86_fp80
726 define x86_fp80 @uitofp_fp80_i16(i16 %a0) nounwind {
727 ; X86-LABEL: uitofp_fp80_i16:
729 ; X86-NEXT: pushl %eax
730 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
731 ; X86-NEXT: movl %eax, (%esp)
732 ; X86-NEXT: fildl (%esp)
733 ; X86-NEXT: popl %eax
736 ; X64-LABEL: uitofp_fp80_i16:
738 ; X64-NEXT: movzwl %di, %eax
739 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
740 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
742 %1 = uitofp i16 %a0 to x86_fp80
746 define x86_fp80 @uitofp_fp80_i16_ld(i16 *%a0) nounwind {
747 ; X86-LABEL: uitofp_fp80_i16_ld:
749 ; X86-NEXT: pushl %eax
750 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
751 ; X86-NEXT: movzwl (%eax), %eax
752 ; X86-NEXT: movl %eax, (%esp)
753 ; X86-NEXT: fildl (%esp)
754 ; X86-NEXT: popl %eax
757 ; X64-LABEL: uitofp_fp80_i16_ld:
759 ; X64-NEXT: movzwl (%rdi), %eax
760 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
761 ; X64-NEXT: fildl -{{[0-9]+}}(%rsp)
763 %1 = load i16, i16 *%a0
764 %2 = uitofp i16 %1 to x86_fp80
768 define x86_fp80 @uitofp_fp80_i32(i32 %a0) nounwind {
769 ; X86-LABEL: uitofp_fp80_i32:
771 ; X86-NEXT: pushl %ebp
772 ; X86-NEXT: movl %esp, %ebp
773 ; X86-NEXT: andl $-8, %esp
774 ; X86-NEXT: subl $8, %esp
775 ; X86-NEXT: movl 8(%ebp), %eax
776 ; X86-NEXT: movl %eax, (%esp)
777 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
778 ; X86-NEXT: fildll (%esp)
779 ; X86-NEXT: movl %ebp, %esp
780 ; X86-NEXT: popl %ebp
783 ; X64-LABEL: uitofp_fp80_i32:
785 ; X64-NEXT: movl %edi, %eax
786 ; X64-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
787 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
789 %1 = uitofp i32 %a0 to x86_fp80
793 define x86_fp80 @uitofp_fp80_i32_ld(i32 *%a0) nounwind {
794 ; X86-LABEL: uitofp_fp80_i32_ld:
796 ; X86-NEXT: pushl %ebp
797 ; X86-NEXT: movl %esp, %ebp
798 ; X86-NEXT: andl $-8, %esp
799 ; X86-NEXT: subl $8, %esp
800 ; X86-NEXT: movl 8(%ebp), %eax
801 ; X86-NEXT: movl (%eax), %eax
802 ; X86-NEXT: movl %eax, (%esp)
803 ; X86-NEXT: movl $0, {{[0-9]+}}(%esp)
804 ; X86-NEXT: fildll (%esp)
805 ; X86-NEXT: movl %ebp, %esp
806 ; X86-NEXT: popl %ebp
809 ; X64-LABEL: uitofp_fp80_i32_ld:
811 ; X64-NEXT: movl (%rdi), %eax
812 ; X64-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
813 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
815 %1 = load i32, i32 *%a0
816 %2 = uitofp i32 %1 to x86_fp80
820 define x86_fp80 @uitofp_fp80_i64(i64 %a0) nounwind {
821 ; X86-LABEL: uitofp_fp80_i64:
823 ; X86-NEXT: pushl %ebp
824 ; X86-NEXT: movl %esp, %ebp
825 ; X86-NEXT: andl $-8, %esp
826 ; X86-NEXT: subl $8, %esp
827 ; X86-NEXT: movl 8(%ebp), %eax
828 ; X86-NEXT: movl 12(%ebp), %ecx
829 ; X86-NEXT: movl %ecx, {{[0-9]+}}(%esp)
830 ; X86-NEXT: movl %eax, (%esp)
831 ; X86-NEXT: xorl %eax, %eax
832 ; X86-NEXT: testl %ecx, %ecx
833 ; X86-NEXT: setns %al
834 ; X86-NEXT: fildll (%esp)
835 ; X86-NEXT: fadds {{\.LCPI.*}}(,%eax,4)
836 ; X86-NEXT: movl %ebp, %esp
837 ; X86-NEXT: popl %ebp
840 ; X64-LABEL: uitofp_fp80_i64:
842 ; X64-NEXT: movq %rdi, -{{[0-9]+}}(%rsp)
843 ; X64-NEXT: xorl %eax, %eax
844 ; X64-NEXT: testq %rdi, %rdi
845 ; X64-NEXT: setns %al
846 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
847 ; X64-NEXT: fadds {{\.LCPI.*}}(,%rax,4)
849 %1 = uitofp i64 %a0 to x86_fp80
853 define x86_fp80 @uitofp_fp80_i64_ld(i64 *%a0) nounwind {
854 ; X86-LABEL: uitofp_fp80_i64_ld:
856 ; X86-NEXT: pushl %ebp
857 ; X86-NEXT: movl %esp, %ebp
858 ; X86-NEXT: andl $-8, %esp
859 ; X86-NEXT: subl $8, %esp
860 ; X86-NEXT: movl 8(%ebp), %eax
861 ; X86-NEXT: movl (%eax), %ecx
862 ; X86-NEXT: movl 4(%eax), %eax
863 ; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
864 ; X86-NEXT: movl %ecx, (%esp)
865 ; X86-NEXT: xorl %ecx, %ecx
866 ; X86-NEXT: testl %eax, %eax
867 ; X86-NEXT: setns %cl
868 ; X86-NEXT: fildll (%esp)
869 ; X86-NEXT: fadds {{\.LCPI.*}}(,%ecx,4)
870 ; X86-NEXT: movl %ebp, %esp
871 ; X86-NEXT: popl %ebp
874 ; X64-LABEL: uitofp_fp80_i64_ld:
876 ; X64-NEXT: movq (%rdi), %rax
877 ; X64-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
878 ; X64-NEXT: xorl %ecx, %ecx
879 ; X64-NEXT: testq %rax, %rax
880 ; X64-NEXT: setns %cl
881 ; X64-NEXT: fildll -{{[0-9]+}}(%rsp)
882 ; X64-NEXT: fadds {{\.LCPI.*}}(,%rcx,4)
884 %1 = load i64, i64 *%a0
885 %2 = uitofp i64 %1 to x86_fp80
893 define x86_fp80 @floor_fp80(x86_fp80 %a0) nounwind {
894 ; X86-LABEL: floor_fp80:
896 ; X86-NEXT: subl $12, %esp
897 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
898 ; X86-NEXT: fstpt (%esp)
899 ; X86-NEXT: calll floorl
900 ; X86-NEXT: addl $12, %esp
903 ; X64-LABEL: floor_fp80:
905 ; X64-NEXT: subq $24, %rsp
906 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
907 ; X64-NEXT: fstpt (%rsp)
908 ; X64-NEXT: callq floorl
909 ; X64-NEXT: addq $24, %rsp
911 %1 = call x86_fp80 @llvm.floor.f80(x86_fp80 %a0)
915 define x86_fp80 @floor_fp80_ld(x86_fp80 *%a0) nounwind {
916 ; X86-LABEL: floor_fp80_ld:
918 ; X86-NEXT: subl $12, %esp
919 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
920 ; X86-NEXT: fldt (%eax)
921 ; X86-NEXT: fstpt (%esp)
922 ; X86-NEXT: calll floorl
923 ; X86-NEXT: addl $12, %esp
926 ; X64-LABEL: floor_fp80_ld:
928 ; X64-NEXT: subq $24, %rsp
929 ; X64-NEXT: fldt (%rdi)
930 ; X64-NEXT: fstpt (%rsp)
931 ; X64-NEXT: callq floorl
932 ; X64-NEXT: addq $24, %rsp
934 %1 = load x86_fp80, x86_fp80 *%a0
935 %2 = call x86_fp80 @llvm.floor.f80(x86_fp80 %1)
939 declare x86_fp80 @llvm.floor.f80(x86_fp80 %p)
945 define x86_fp80 @ceil_fp80(x86_fp80 %a0) nounwind {
946 ; X86-LABEL: ceil_fp80:
948 ; X86-NEXT: subl $12, %esp
949 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
950 ; X86-NEXT: fstpt (%esp)
951 ; X86-NEXT: calll ceill
952 ; X86-NEXT: addl $12, %esp
955 ; X64-LABEL: ceil_fp80:
957 ; X64-NEXT: subq $24, %rsp
958 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
959 ; X64-NEXT: fstpt (%rsp)
960 ; X64-NEXT: callq ceill
961 ; X64-NEXT: addq $24, %rsp
963 %1 = call x86_fp80 @llvm.ceil.f80(x86_fp80 %a0)
967 define x86_fp80 @ceil_fp80_ld(x86_fp80 *%a0) nounwind {
968 ; X86-LABEL: ceil_fp80_ld:
970 ; X86-NEXT: subl $12, %esp
971 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
972 ; X86-NEXT: fldt (%eax)
973 ; X86-NEXT: fstpt (%esp)
974 ; X86-NEXT: calll ceill
975 ; X86-NEXT: addl $12, %esp
978 ; X64-LABEL: ceil_fp80_ld:
980 ; X64-NEXT: subq $24, %rsp
981 ; X64-NEXT: fldt (%rdi)
982 ; X64-NEXT: fstpt (%rsp)
983 ; X64-NEXT: callq ceill
984 ; X64-NEXT: addq $24, %rsp
986 %1 = load x86_fp80, x86_fp80 *%a0
987 %2 = call x86_fp80 @llvm.ceil.f80(x86_fp80 %1)
991 declare x86_fp80 @llvm.ceil.f80(x86_fp80 %p)
997 define x86_fp80 @trunc_fp80(x86_fp80 %a0) nounwind {
998 ; X86-LABEL: trunc_fp80:
1000 ; X86-NEXT: subl $12, %esp
1001 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
1002 ; X86-NEXT: fstpt (%esp)
1003 ; X86-NEXT: calll truncl
1004 ; X86-NEXT: addl $12, %esp
1007 ; X64-LABEL: trunc_fp80:
1009 ; X64-NEXT: subq $24, %rsp
1010 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
1011 ; X64-NEXT: fstpt (%rsp)
1012 ; X64-NEXT: callq truncl
1013 ; X64-NEXT: addq $24, %rsp
1015 %1 = call x86_fp80 @llvm.trunc.f80(x86_fp80 %a0)
1019 define x86_fp80 @trunc_fp80_ld(x86_fp80 *%a0) nounwind {
1020 ; X86-LABEL: trunc_fp80_ld:
1022 ; X86-NEXT: subl $12, %esp
1023 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
1024 ; X86-NEXT: fldt (%eax)
1025 ; X86-NEXT: fstpt (%esp)
1026 ; X86-NEXT: calll truncl
1027 ; X86-NEXT: addl $12, %esp
1030 ; X64-LABEL: trunc_fp80_ld:
1032 ; X64-NEXT: subq $24, %rsp
1033 ; X64-NEXT: fldt (%rdi)
1034 ; X64-NEXT: fstpt (%rsp)
1035 ; X64-NEXT: callq truncl
1036 ; X64-NEXT: addq $24, %rsp
1038 %1 = load x86_fp80, x86_fp80 *%a0
1039 %2 = call x86_fp80 @llvm.trunc.f80(x86_fp80 %1)
1043 declare x86_fp80 @llvm.trunc.f80(x86_fp80 %p)
1049 define x86_fp80 @rint_fp80(x86_fp80 %a0) nounwind {
1050 ; X86-LABEL: rint_fp80:
1052 ; X86-NEXT: subl $12, %esp
1053 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
1054 ; X86-NEXT: fstpt (%esp)
1055 ; X86-NEXT: calll rintl
1056 ; X86-NEXT: addl $12, %esp
1059 ; X64-LABEL: rint_fp80:
1061 ; X64-NEXT: subq $24, %rsp
1062 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
1063 ; X64-NEXT: fstpt (%rsp)
1064 ; X64-NEXT: callq rintl
1065 ; X64-NEXT: addq $24, %rsp
1067 %1 = call x86_fp80 @llvm.rint.f80(x86_fp80 %a0)
1071 define x86_fp80 @rint_fp80_ld(x86_fp80 *%a0) nounwind {
1072 ; X86-LABEL: rint_fp80_ld:
1074 ; X86-NEXT: subl $12, %esp
1075 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
1076 ; X86-NEXT: fldt (%eax)
1077 ; X86-NEXT: fstpt (%esp)
1078 ; X86-NEXT: calll rintl
1079 ; X86-NEXT: addl $12, %esp
1082 ; X64-LABEL: rint_fp80_ld:
1084 ; X64-NEXT: subq $24, %rsp
1085 ; X64-NEXT: fldt (%rdi)
1086 ; X64-NEXT: fstpt (%rsp)
1087 ; X64-NEXT: callq rintl
1088 ; X64-NEXT: addq $24, %rsp
1090 %1 = load x86_fp80, x86_fp80 *%a0
1091 %2 = call x86_fp80 @llvm.rint.f80(x86_fp80 %1)
1095 declare x86_fp80 @llvm.rint.f80(x86_fp80 %p)