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
3 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X64
9 define x86_fp80 @fiadd_fp80_i16(x86_fp80 %a0, i16 %a1) {
10 ; X86-LABEL: fiadd_fp80_i16:
12 ; X86-NEXT: pushl %eax
13 ; X86-NEXT: .cfi_def_cfa_offset 8
14 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
15 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
16 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
17 ; X86-NEXT: fiadds {{[0-9]+}}(%esp)
19 ; X86-NEXT: .cfi_def_cfa_offset 4
22 ; X64-LABEL: fiadd_fp80_i16:
24 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
25 ; X64-NEXT: movswl %di, %eax
26 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
27 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
29 %1 = sitofp i16 %a1 to x86_fp80
30 %2 = fadd x86_fp80 %a0, %1
34 define x86_fp80 @fiadd_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
35 ; X86-LABEL: fiadd_fp80_i16_ld:
37 ; X86-NEXT: pushl %eax
38 ; X86-NEXT: .cfi_def_cfa_offset 8
39 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
40 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
41 ; X86-NEXT: movzwl (%eax), %eax
42 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
43 ; X86-NEXT: fiadds {{[0-9]+}}(%esp)
45 ; X86-NEXT: .cfi_def_cfa_offset 4
48 ; X64-LABEL: fiadd_fp80_i16_ld:
50 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
51 ; X64-NEXT: movswl (%rdi), %eax
52 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
53 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
55 %1 = load i16, i16 *%a1
56 %2 = sitofp i16 %1 to x86_fp80
57 %3 = fadd x86_fp80 %a0, %2
61 define x86_fp80 @fiadd_fp80_i32(x86_fp80 %a0, i32 %a1) {
62 ; X86-LABEL: fiadd_fp80_i32:
64 ; X86-NEXT: pushl %eax
65 ; X86-NEXT: .cfi_def_cfa_offset 8
66 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
67 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
68 ; X86-NEXT: movl %eax, (%esp)
69 ; X86-NEXT: fiaddl (%esp)
71 ; X86-NEXT: .cfi_def_cfa_offset 4
74 ; X64-LABEL: fiadd_fp80_i32:
76 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
77 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
78 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
80 %1 = sitofp i32 %a1 to x86_fp80
81 %2 = fadd x86_fp80 %a0, %1
85 define x86_fp80 @fiadd_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
86 ; X86-LABEL: fiadd_fp80_i32_ld:
88 ; X86-NEXT: pushl %eax
89 ; X86-NEXT: .cfi_def_cfa_offset 8
90 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
91 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
92 ; X86-NEXT: movl (%eax), %eax
93 ; X86-NEXT: movl %eax, (%esp)
94 ; X86-NEXT: fiaddl (%esp)
96 ; X86-NEXT: .cfi_def_cfa_offset 4
99 ; X64-LABEL: fiadd_fp80_i32_ld:
101 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
102 ; X64-NEXT: movl (%rdi), %eax
103 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
104 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
106 %1 = load i32, i32 *%a1
107 %2 = sitofp i32 %1 to x86_fp80
108 %3 = fadd x86_fp80 %a0, %2
116 define x86_fp80 @fisub_fp80_i16(x86_fp80 %a0, i16 %a1) {
117 ; X86-LABEL: fisub_fp80_i16:
119 ; X86-NEXT: pushl %eax
120 ; X86-NEXT: .cfi_def_cfa_offset 8
121 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
122 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
123 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
124 ; X86-NEXT: fisubs {{[0-9]+}}(%esp)
125 ; X86-NEXT: popl %eax
126 ; X86-NEXT: .cfi_def_cfa_offset 4
129 ; X64-LABEL: fisub_fp80_i16:
131 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
132 ; X64-NEXT: movswl %di, %eax
133 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
134 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
136 %1 = sitofp i16 %a1 to x86_fp80
137 %2 = fsub x86_fp80 %a0, %1
141 define x86_fp80 @fisub_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
142 ; X86-LABEL: fisub_fp80_i16_ld:
144 ; X86-NEXT: pushl %eax
145 ; X86-NEXT: .cfi_def_cfa_offset 8
146 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
147 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
148 ; X86-NEXT: movzwl (%eax), %eax
149 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
150 ; X86-NEXT: fisubs {{[0-9]+}}(%esp)
151 ; X86-NEXT: popl %eax
152 ; X86-NEXT: .cfi_def_cfa_offset 4
155 ; X64-LABEL: fisub_fp80_i16_ld:
157 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
158 ; X64-NEXT: movswl (%rdi), %eax
159 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
160 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
162 %1 = load i16, i16 *%a1
163 %2 = sitofp i16 %1 to x86_fp80
164 %3 = fsub x86_fp80 %a0, %2
168 define x86_fp80 @fisub_fp80_i32(x86_fp80 %a0, i32 %a1) {
169 ; X86-LABEL: fisub_fp80_i32:
171 ; X86-NEXT: pushl %eax
172 ; X86-NEXT: .cfi_def_cfa_offset 8
173 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
174 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
175 ; X86-NEXT: movl %eax, (%esp)
176 ; X86-NEXT: fisubl (%esp)
177 ; X86-NEXT: popl %eax
178 ; X86-NEXT: .cfi_def_cfa_offset 4
181 ; X64-LABEL: fisub_fp80_i32:
183 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
184 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
185 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
187 %1 = sitofp i32 %a1 to x86_fp80
188 %2 = fsub x86_fp80 %a0, %1
192 define x86_fp80 @fisub_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
193 ; X86-LABEL: fisub_fp80_i32_ld:
195 ; X86-NEXT: pushl %eax
196 ; X86-NEXT: .cfi_def_cfa_offset 8
197 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
198 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
199 ; X86-NEXT: movl (%eax), %eax
200 ; X86-NEXT: movl %eax, (%esp)
201 ; X86-NEXT: fisubl (%esp)
202 ; X86-NEXT: popl %eax
203 ; X86-NEXT: .cfi_def_cfa_offset 4
206 ; X64-LABEL: fisub_fp80_i32_ld:
208 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
209 ; X64-NEXT: movl (%rdi), %eax
210 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
211 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
213 %1 = load i32, i32 *%a1
214 %2 = sitofp i32 %1 to x86_fp80
215 %3 = fsub x86_fp80 %a0, %2
223 define x86_fp80 @fisubr_fp80_i16(x86_fp80 %a0, i16 %a1) {
224 ; X86-LABEL: fisubr_fp80_i16:
226 ; X86-NEXT: pushl %eax
227 ; X86-NEXT: .cfi_def_cfa_offset 8
228 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
229 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
230 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
231 ; X86-NEXT: fisubrs {{[0-9]+}}(%esp)
232 ; X86-NEXT: popl %eax
233 ; X86-NEXT: .cfi_def_cfa_offset 4
236 ; X64-LABEL: fisubr_fp80_i16:
238 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
239 ; X64-NEXT: movswl %di, %eax
240 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
241 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
243 %1 = sitofp i16 %a1 to x86_fp80
244 %2 = fsub x86_fp80 %1, %a0
248 define x86_fp80 @fisubr_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
249 ; X86-LABEL: fisubr_fp80_i16_ld:
251 ; X86-NEXT: pushl %eax
252 ; X86-NEXT: .cfi_def_cfa_offset 8
253 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
254 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
255 ; X86-NEXT: movzwl (%eax), %eax
256 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
257 ; X86-NEXT: fisubrs {{[0-9]+}}(%esp)
258 ; X86-NEXT: popl %eax
259 ; X86-NEXT: .cfi_def_cfa_offset 4
262 ; X64-LABEL: fisubr_fp80_i16_ld:
264 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
265 ; X64-NEXT: movswl (%rdi), %eax
266 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
267 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
269 %1 = load i16, i16 *%a1
270 %2 = sitofp i16 %1 to x86_fp80
271 %3 = fsub x86_fp80 %2, %a0
275 define x86_fp80 @fisubr_fp80_i32(x86_fp80 %a0, i32 %a1) {
276 ; X86-LABEL: fisubr_fp80_i32:
278 ; X86-NEXT: pushl %eax
279 ; X86-NEXT: .cfi_def_cfa_offset 8
280 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
281 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
282 ; X86-NEXT: movl %eax, (%esp)
283 ; X86-NEXT: fisubrl (%esp)
284 ; X86-NEXT: popl %eax
285 ; X86-NEXT: .cfi_def_cfa_offset 4
288 ; X64-LABEL: fisubr_fp80_i32:
290 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
291 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
292 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
294 %1 = sitofp i32 %a1 to x86_fp80
295 %2 = fsub x86_fp80 %1, %a0
299 define x86_fp80 @fisubr_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
300 ; X86-LABEL: fisubr_fp80_i32_ld:
302 ; X86-NEXT: pushl %eax
303 ; X86-NEXT: .cfi_def_cfa_offset 8
304 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
305 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
306 ; X86-NEXT: movl (%eax), %eax
307 ; X86-NEXT: movl %eax, (%esp)
308 ; X86-NEXT: fisubrl (%esp)
309 ; X86-NEXT: popl %eax
310 ; X86-NEXT: .cfi_def_cfa_offset 4
313 ; X64-LABEL: fisubr_fp80_i32_ld:
315 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
316 ; X64-NEXT: movl (%rdi), %eax
317 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
318 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
320 %1 = load i32, i32 *%a1
321 %2 = sitofp i32 %1 to x86_fp80
322 %3 = fsub x86_fp80 %2, %a0
330 define x86_fp80 @fimul_fp80_i16(x86_fp80 %a0, i16 %a1) {
331 ; X86-LABEL: fimul_fp80_i16:
333 ; X86-NEXT: pushl %eax
334 ; X86-NEXT: .cfi_def_cfa_offset 8
335 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
336 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
337 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
338 ; X86-NEXT: fimuls {{[0-9]+}}(%esp)
339 ; X86-NEXT: popl %eax
340 ; X86-NEXT: .cfi_def_cfa_offset 4
343 ; X64-LABEL: fimul_fp80_i16:
345 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
346 ; X64-NEXT: movswl %di, %eax
347 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
348 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
350 %1 = sitofp i16 %a1 to x86_fp80
351 %2 = fmul x86_fp80 %a0, %1
355 define x86_fp80 @fimul_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
356 ; X86-LABEL: fimul_fp80_i16_ld:
358 ; X86-NEXT: pushl %eax
359 ; X86-NEXT: .cfi_def_cfa_offset 8
360 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
361 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
362 ; X86-NEXT: movzwl (%eax), %eax
363 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
364 ; X86-NEXT: fimuls {{[0-9]+}}(%esp)
365 ; X86-NEXT: popl %eax
366 ; X86-NEXT: .cfi_def_cfa_offset 4
369 ; X64-LABEL: fimul_fp80_i16_ld:
371 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
372 ; X64-NEXT: movswl (%rdi), %eax
373 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
374 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
376 %1 = load i16, i16 *%a1
377 %2 = sitofp i16 %1 to x86_fp80
378 %3 = fmul x86_fp80 %a0, %2
382 define x86_fp80 @fimul_fp80_i32(x86_fp80 %a0, i32 %a1) {
383 ; X86-LABEL: fimul_fp80_i32:
385 ; X86-NEXT: pushl %eax
386 ; X86-NEXT: .cfi_def_cfa_offset 8
387 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
388 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
389 ; X86-NEXT: movl %eax, (%esp)
390 ; X86-NEXT: fimull (%esp)
391 ; X86-NEXT: popl %eax
392 ; X86-NEXT: .cfi_def_cfa_offset 4
395 ; X64-LABEL: fimul_fp80_i32:
397 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
398 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
399 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
401 %1 = sitofp i32 %a1 to x86_fp80
402 %2 = fmul x86_fp80 %a0, %1
406 define x86_fp80 @fimul_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
407 ; X86-LABEL: fimul_fp80_i32_ld:
409 ; X86-NEXT: pushl %eax
410 ; X86-NEXT: .cfi_def_cfa_offset 8
411 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
412 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
413 ; X86-NEXT: movl (%eax), %eax
414 ; X86-NEXT: movl %eax, (%esp)
415 ; X86-NEXT: fimull (%esp)
416 ; X86-NEXT: popl %eax
417 ; X86-NEXT: .cfi_def_cfa_offset 4
420 ; X64-LABEL: fimul_fp80_i32_ld:
422 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
423 ; X64-NEXT: movl (%rdi), %eax
424 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
425 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
427 %1 = load i32, i32 *%a1
428 %2 = sitofp i32 %1 to x86_fp80
429 %3 = fmul x86_fp80 %a0, %2
437 define x86_fp80 @fidiv_fp80_i16(x86_fp80 %a0, i16 %a1) {
438 ; X86-LABEL: fidiv_fp80_i16:
440 ; X86-NEXT: pushl %eax
441 ; X86-NEXT: .cfi_def_cfa_offset 8
442 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
443 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
444 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
445 ; X86-NEXT: fidivs {{[0-9]+}}(%esp)
446 ; X86-NEXT: popl %eax
447 ; X86-NEXT: .cfi_def_cfa_offset 4
450 ; X64-LABEL: fidiv_fp80_i16:
452 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
453 ; X64-NEXT: movswl %di, %eax
454 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
455 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
457 %1 = sitofp i16 %a1 to x86_fp80
458 %2 = fdiv x86_fp80 %a0, %1
462 define x86_fp80 @fidiv_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
463 ; X86-LABEL: fidiv_fp80_i16_ld:
465 ; X86-NEXT: pushl %eax
466 ; X86-NEXT: .cfi_def_cfa_offset 8
467 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
468 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
469 ; X86-NEXT: movzwl (%eax), %eax
470 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
471 ; X86-NEXT: fidivs {{[0-9]+}}(%esp)
472 ; X86-NEXT: popl %eax
473 ; X86-NEXT: .cfi_def_cfa_offset 4
476 ; X64-LABEL: fidiv_fp80_i16_ld:
478 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
479 ; X64-NEXT: movswl (%rdi), %eax
480 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
481 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
483 %1 = load i16, i16 *%a1
484 %2 = sitofp i16 %1 to x86_fp80
485 %3 = fdiv x86_fp80 %a0, %2
489 define x86_fp80 @fidiv_fp80_i32(x86_fp80 %a0, i32 %a1) {
490 ; X86-LABEL: fidiv_fp80_i32:
492 ; X86-NEXT: pushl %eax
493 ; X86-NEXT: .cfi_def_cfa_offset 8
494 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
495 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
496 ; X86-NEXT: movl %eax, (%esp)
497 ; X86-NEXT: fidivl (%esp)
498 ; X86-NEXT: popl %eax
499 ; X86-NEXT: .cfi_def_cfa_offset 4
502 ; X64-LABEL: fidiv_fp80_i32:
504 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
505 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
506 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
508 %1 = sitofp i32 %a1 to x86_fp80
509 %2 = fdiv x86_fp80 %a0, %1
513 define x86_fp80 @fidiv_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
514 ; X86-LABEL: fidiv_fp80_i32_ld:
516 ; X86-NEXT: pushl %eax
517 ; X86-NEXT: .cfi_def_cfa_offset 8
518 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
519 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
520 ; X86-NEXT: movl (%eax), %eax
521 ; X86-NEXT: movl %eax, (%esp)
522 ; X86-NEXT: fidivl (%esp)
523 ; X86-NEXT: popl %eax
524 ; X86-NEXT: .cfi_def_cfa_offset 4
527 ; X64-LABEL: fidiv_fp80_i32_ld:
529 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
530 ; X64-NEXT: movl (%rdi), %eax
531 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
532 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
534 %1 = load i32, i32 *%a1
535 %2 = sitofp i32 %1 to x86_fp80
536 %3 = fdiv x86_fp80 %a0, %2
544 define x86_fp80 @fidivr_fp80_i16(x86_fp80 %a0, i16 %a1) {
545 ; X86-LABEL: fidivr_fp80_i16:
547 ; X86-NEXT: pushl %eax
548 ; X86-NEXT: .cfi_def_cfa_offset 8
549 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
550 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
551 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
552 ; X86-NEXT: fidivrs {{[0-9]+}}(%esp)
553 ; X86-NEXT: popl %eax
554 ; X86-NEXT: .cfi_def_cfa_offset 4
557 ; X64-LABEL: fidivr_fp80_i16:
559 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
560 ; X64-NEXT: movswl %di, %eax
561 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
562 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
564 %1 = sitofp i16 %a1 to x86_fp80
565 %2 = fdiv x86_fp80 %1, %a0
569 define x86_fp80 @fidivr_fp80_i16_ld(x86_fp80 %a0, i16 *%a1) {
570 ; X86-LABEL: fidivr_fp80_i16_ld:
572 ; X86-NEXT: pushl %eax
573 ; X86-NEXT: .cfi_def_cfa_offset 8
574 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
575 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
576 ; X86-NEXT: movzwl (%eax), %eax
577 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
578 ; X86-NEXT: fidivrs {{[0-9]+}}(%esp)
579 ; X86-NEXT: popl %eax
580 ; X86-NEXT: .cfi_def_cfa_offset 4
583 ; X64-LABEL: fidivr_fp80_i16_ld:
585 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
586 ; X64-NEXT: movswl (%rdi), %eax
587 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
588 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
590 %1 = load i16, i16 *%a1
591 %2 = sitofp i16 %1 to x86_fp80
592 %3 = fdiv x86_fp80 %2, %a0
596 define x86_fp80 @fidivr_fp80_i32(x86_fp80 %a0, i32 %a1) {
597 ; X86-LABEL: fidivr_fp80_i32:
599 ; X86-NEXT: pushl %eax
600 ; X86-NEXT: .cfi_def_cfa_offset 8
601 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
602 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
603 ; X86-NEXT: movl %eax, (%esp)
604 ; X86-NEXT: fidivrl (%esp)
605 ; X86-NEXT: popl %eax
606 ; X86-NEXT: .cfi_def_cfa_offset 4
609 ; X64-LABEL: fidivr_fp80_i32:
611 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
612 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
613 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
615 %1 = sitofp i32 %a1 to x86_fp80
616 %2 = fdiv x86_fp80 %1, %a0
620 define x86_fp80 @fidivr_fp80_i32_ld(x86_fp80 %a0, i32 *%a1) {
621 ; X86-LABEL: fidivr_fp80_i32_ld:
623 ; X86-NEXT: pushl %eax
624 ; X86-NEXT: .cfi_def_cfa_offset 8
625 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
626 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
627 ; X86-NEXT: movl (%eax), %eax
628 ; X86-NEXT: movl %eax, (%esp)
629 ; X86-NEXT: fidivrl (%esp)
630 ; X86-NEXT: popl %eax
631 ; X86-NEXT: .cfi_def_cfa_offset 4
634 ; X64-LABEL: fidivr_fp80_i32_ld:
636 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
637 ; X64-NEXT: movl (%rdi), %eax
638 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
639 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
641 %1 = load i32, i32 *%a1
642 %2 = sitofp i32 %1 to x86_fp80
643 %3 = fdiv x86_fp80 %2, %a0