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: movw %di, -{{[0-9]+}}(%rsp)
26 ; X64-NEXT: fiadds -{{[0-9]+}}(%rsp)
28 %1 = sitofp i16 %a1 to x86_fp80
29 %2 = fadd x86_fp80 %a0, %1
33 define x86_fp80 @fiadd_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
34 ; X86-LABEL: fiadd_fp80_i16_ld:
36 ; X86-NEXT: pushl %eax
37 ; X86-NEXT: .cfi_def_cfa_offset 8
38 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
39 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
40 ; X86-NEXT: movzwl (%eax), %eax
41 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
42 ; X86-NEXT: fiadds {{[0-9]+}}(%esp)
44 ; X86-NEXT: .cfi_def_cfa_offset 4
47 ; X64-LABEL: fiadd_fp80_i16_ld:
49 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
50 ; X64-NEXT: movzwl (%rdi), %eax
51 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
52 ; X64-NEXT: fiadds -{{[0-9]+}}(%rsp)
55 %2 = sitofp i16 %1 to x86_fp80
56 %3 = fadd x86_fp80 %a0, %2
60 define x86_fp80 @fiadd_fp80_i32(x86_fp80 %a0, i32 %a1) {
61 ; X86-LABEL: fiadd_fp80_i32:
63 ; X86-NEXT: pushl %eax
64 ; X86-NEXT: .cfi_def_cfa_offset 8
65 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
66 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
67 ; X86-NEXT: movl %eax, (%esp)
68 ; X86-NEXT: fiaddl (%esp)
70 ; X86-NEXT: .cfi_def_cfa_offset 4
73 ; X64-LABEL: fiadd_fp80_i32:
75 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
76 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
77 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
79 %1 = sitofp i32 %a1 to x86_fp80
80 %2 = fadd x86_fp80 %a0, %1
84 define x86_fp80 @fiadd_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
85 ; X86-LABEL: fiadd_fp80_i32_ld:
87 ; X86-NEXT: pushl %eax
88 ; X86-NEXT: .cfi_def_cfa_offset 8
89 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
90 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
91 ; X86-NEXT: movl (%eax), %eax
92 ; X86-NEXT: movl %eax, (%esp)
93 ; X86-NEXT: fiaddl (%esp)
95 ; X86-NEXT: .cfi_def_cfa_offset 4
98 ; X64-LABEL: fiadd_fp80_i32_ld:
100 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
101 ; X64-NEXT: movl (%rdi), %eax
102 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
103 ; X64-NEXT: fiaddl -{{[0-9]+}}(%rsp)
105 %1 = load i32, ptr%a1
106 %2 = sitofp i32 %1 to x86_fp80
107 %3 = fadd x86_fp80 %a0, %2
115 define x86_fp80 @fisub_fp80_i16(x86_fp80 %a0, i16 %a1) {
116 ; X86-LABEL: fisub_fp80_i16:
118 ; X86-NEXT: pushl %eax
119 ; X86-NEXT: .cfi_def_cfa_offset 8
120 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
121 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
122 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
123 ; X86-NEXT: fisubs {{[0-9]+}}(%esp)
124 ; X86-NEXT: popl %eax
125 ; X86-NEXT: .cfi_def_cfa_offset 4
128 ; X64-LABEL: fisub_fp80_i16:
130 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
131 ; X64-NEXT: movw %di, -{{[0-9]+}}(%rsp)
132 ; X64-NEXT: fisubs -{{[0-9]+}}(%rsp)
134 %1 = sitofp i16 %a1 to x86_fp80
135 %2 = fsub x86_fp80 %a0, %1
139 define x86_fp80 @fisub_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
140 ; X86-LABEL: fisub_fp80_i16_ld:
142 ; X86-NEXT: pushl %eax
143 ; X86-NEXT: .cfi_def_cfa_offset 8
144 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
145 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
146 ; X86-NEXT: movzwl (%eax), %eax
147 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
148 ; X86-NEXT: fisubs {{[0-9]+}}(%esp)
149 ; X86-NEXT: popl %eax
150 ; X86-NEXT: .cfi_def_cfa_offset 4
153 ; X64-LABEL: fisub_fp80_i16_ld:
155 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
156 ; X64-NEXT: movzwl (%rdi), %eax
157 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
158 ; X64-NEXT: fisubs -{{[0-9]+}}(%rsp)
160 %1 = load i16, ptr%a1
161 %2 = sitofp i16 %1 to x86_fp80
162 %3 = fsub x86_fp80 %a0, %2
166 define x86_fp80 @fisub_fp80_i32(x86_fp80 %a0, i32 %a1) {
167 ; X86-LABEL: fisub_fp80_i32:
169 ; X86-NEXT: pushl %eax
170 ; X86-NEXT: .cfi_def_cfa_offset 8
171 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
172 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
173 ; X86-NEXT: movl %eax, (%esp)
174 ; X86-NEXT: fisubl (%esp)
175 ; X86-NEXT: popl %eax
176 ; X86-NEXT: .cfi_def_cfa_offset 4
179 ; X64-LABEL: fisub_fp80_i32:
181 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
182 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
183 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
185 %1 = sitofp i32 %a1 to x86_fp80
186 %2 = fsub x86_fp80 %a0, %1
190 define x86_fp80 @fisub_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
191 ; X86-LABEL: fisub_fp80_i32_ld:
193 ; X86-NEXT: pushl %eax
194 ; X86-NEXT: .cfi_def_cfa_offset 8
195 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
196 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
197 ; X86-NEXT: movl (%eax), %eax
198 ; X86-NEXT: movl %eax, (%esp)
199 ; X86-NEXT: fisubl (%esp)
200 ; X86-NEXT: popl %eax
201 ; X86-NEXT: .cfi_def_cfa_offset 4
204 ; X64-LABEL: fisub_fp80_i32_ld:
206 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
207 ; X64-NEXT: movl (%rdi), %eax
208 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
209 ; X64-NEXT: fisubl -{{[0-9]+}}(%rsp)
211 %1 = load i32, ptr%a1
212 %2 = sitofp i32 %1 to x86_fp80
213 %3 = fsub x86_fp80 %a0, %2
221 define x86_fp80 @fisubr_fp80_i16(x86_fp80 %a0, i16 %a1) {
222 ; X86-LABEL: fisubr_fp80_i16:
224 ; X86-NEXT: pushl %eax
225 ; X86-NEXT: .cfi_def_cfa_offset 8
226 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
227 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
228 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
229 ; X86-NEXT: fisubrs {{[0-9]+}}(%esp)
230 ; X86-NEXT: popl %eax
231 ; X86-NEXT: .cfi_def_cfa_offset 4
234 ; X64-LABEL: fisubr_fp80_i16:
236 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
237 ; X64-NEXT: movw %di, -{{[0-9]+}}(%rsp)
238 ; X64-NEXT: fisubrs -{{[0-9]+}}(%rsp)
240 %1 = sitofp i16 %a1 to x86_fp80
241 %2 = fsub x86_fp80 %1, %a0
245 define x86_fp80 @fisubr_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
246 ; X86-LABEL: fisubr_fp80_i16_ld:
248 ; X86-NEXT: pushl %eax
249 ; X86-NEXT: .cfi_def_cfa_offset 8
250 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
251 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
252 ; X86-NEXT: movzwl (%eax), %eax
253 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
254 ; X86-NEXT: fisubrs {{[0-9]+}}(%esp)
255 ; X86-NEXT: popl %eax
256 ; X86-NEXT: .cfi_def_cfa_offset 4
259 ; X64-LABEL: fisubr_fp80_i16_ld:
261 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
262 ; X64-NEXT: movzwl (%rdi), %eax
263 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
264 ; X64-NEXT: fisubrs -{{[0-9]+}}(%rsp)
266 %1 = load i16, ptr%a1
267 %2 = sitofp i16 %1 to x86_fp80
268 %3 = fsub x86_fp80 %2, %a0
272 define x86_fp80 @fisubr_fp80_i32(x86_fp80 %a0, i32 %a1) {
273 ; X86-LABEL: fisubr_fp80_i32:
275 ; X86-NEXT: pushl %eax
276 ; X86-NEXT: .cfi_def_cfa_offset 8
277 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
278 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
279 ; X86-NEXT: movl %eax, (%esp)
280 ; X86-NEXT: fisubrl (%esp)
281 ; X86-NEXT: popl %eax
282 ; X86-NEXT: .cfi_def_cfa_offset 4
285 ; X64-LABEL: fisubr_fp80_i32:
287 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
288 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
289 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
291 %1 = sitofp i32 %a1 to x86_fp80
292 %2 = fsub x86_fp80 %1, %a0
296 define x86_fp80 @fisubr_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
297 ; X86-LABEL: fisubr_fp80_i32_ld:
299 ; X86-NEXT: pushl %eax
300 ; X86-NEXT: .cfi_def_cfa_offset 8
301 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
302 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
303 ; X86-NEXT: movl (%eax), %eax
304 ; X86-NEXT: movl %eax, (%esp)
305 ; X86-NEXT: fisubrl (%esp)
306 ; X86-NEXT: popl %eax
307 ; X86-NEXT: .cfi_def_cfa_offset 4
310 ; X64-LABEL: fisubr_fp80_i32_ld:
312 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
313 ; X64-NEXT: movl (%rdi), %eax
314 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
315 ; X64-NEXT: fisubrl -{{[0-9]+}}(%rsp)
317 %1 = load i32, ptr%a1
318 %2 = sitofp i32 %1 to x86_fp80
319 %3 = fsub x86_fp80 %2, %a0
327 define x86_fp80 @fimul_fp80_i16(x86_fp80 %a0, i16 %a1) {
328 ; X86-LABEL: fimul_fp80_i16:
330 ; X86-NEXT: pushl %eax
331 ; X86-NEXT: .cfi_def_cfa_offset 8
332 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
333 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
334 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
335 ; X86-NEXT: fimuls {{[0-9]+}}(%esp)
336 ; X86-NEXT: popl %eax
337 ; X86-NEXT: .cfi_def_cfa_offset 4
340 ; X64-LABEL: fimul_fp80_i16:
342 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
343 ; X64-NEXT: movw %di, -{{[0-9]+}}(%rsp)
344 ; X64-NEXT: fimuls -{{[0-9]+}}(%rsp)
346 %1 = sitofp i16 %a1 to x86_fp80
347 %2 = fmul x86_fp80 %a0, %1
351 define x86_fp80 @fimul_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
352 ; X86-LABEL: fimul_fp80_i16_ld:
354 ; X86-NEXT: pushl %eax
355 ; X86-NEXT: .cfi_def_cfa_offset 8
356 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
357 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
358 ; X86-NEXT: movzwl (%eax), %eax
359 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
360 ; X86-NEXT: fimuls {{[0-9]+}}(%esp)
361 ; X86-NEXT: popl %eax
362 ; X86-NEXT: .cfi_def_cfa_offset 4
365 ; X64-LABEL: fimul_fp80_i16_ld:
367 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
368 ; X64-NEXT: movzwl (%rdi), %eax
369 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
370 ; X64-NEXT: fimuls -{{[0-9]+}}(%rsp)
372 %1 = load i16, ptr%a1
373 %2 = sitofp i16 %1 to x86_fp80
374 %3 = fmul x86_fp80 %a0, %2
378 define x86_fp80 @fimul_fp80_i32(x86_fp80 %a0, i32 %a1) {
379 ; X86-LABEL: fimul_fp80_i32:
381 ; X86-NEXT: pushl %eax
382 ; X86-NEXT: .cfi_def_cfa_offset 8
383 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
384 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
385 ; X86-NEXT: movl %eax, (%esp)
386 ; X86-NEXT: fimull (%esp)
387 ; X86-NEXT: popl %eax
388 ; X86-NEXT: .cfi_def_cfa_offset 4
391 ; X64-LABEL: fimul_fp80_i32:
393 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
394 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
395 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
397 %1 = sitofp i32 %a1 to x86_fp80
398 %2 = fmul x86_fp80 %a0, %1
402 define x86_fp80 @fimul_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
403 ; X86-LABEL: fimul_fp80_i32_ld:
405 ; X86-NEXT: pushl %eax
406 ; X86-NEXT: .cfi_def_cfa_offset 8
407 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
408 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
409 ; X86-NEXT: movl (%eax), %eax
410 ; X86-NEXT: movl %eax, (%esp)
411 ; X86-NEXT: fimull (%esp)
412 ; X86-NEXT: popl %eax
413 ; X86-NEXT: .cfi_def_cfa_offset 4
416 ; X64-LABEL: fimul_fp80_i32_ld:
418 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
419 ; X64-NEXT: movl (%rdi), %eax
420 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
421 ; X64-NEXT: fimull -{{[0-9]+}}(%rsp)
423 %1 = load i32, ptr%a1
424 %2 = sitofp i32 %1 to x86_fp80
425 %3 = fmul x86_fp80 %a0, %2
433 define x86_fp80 @fidiv_fp80_i16(x86_fp80 %a0, i16 %a1) {
434 ; X86-LABEL: fidiv_fp80_i16:
436 ; X86-NEXT: pushl %eax
437 ; X86-NEXT: .cfi_def_cfa_offset 8
438 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
439 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
440 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
441 ; X86-NEXT: fidivs {{[0-9]+}}(%esp)
442 ; X86-NEXT: popl %eax
443 ; X86-NEXT: .cfi_def_cfa_offset 4
446 ; X64-LABEL: fidiv_fp80_i16:
448 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
449 ; X64-NEXT: movw %di, -{{[0-9]+}}(%rsp)
450 ; X64-NEXT: fidivs -{{[0-9]+}}(%rsp)
452 %1 = sitofp i16 %a1 to x86_fp80
453 %2 = fdiv x86_fp80 %a0, %1
457 define x86_fp80 @fidiv_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
458 ; X86-LABEL: fidiv_fp80_i16_ld:
460 ; X86-NEXT: pushl %eax
461 ; X86-NEXT: .cfi_def_cfa_offset 8
462 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
463 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
464 ; X86-NEXT: movzwl (%eax), %eax
465 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
466 ; X86-NEXT: fidivs {{[0-9]+}}(%esp)
467 ; X86-NEXT: popl %eax
468 ; X86-NEXT: .cfi_def_cfa_offset 4
471 ; X64-LABEL: fidiv_fp80_i16_ld:
473 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
474 ; X64-NEXT: movzwl (%rdi), %eax
475 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
476 ; X64-NEXT: fidivs -{{[0-9]+}}(%rsp)
478 %1 = load i16, ptr%a1
479 %2 = sitofp i16 %1 to x86_fp80
480 %3 = fdiv x86_fp80 %a0, %2
484 define x86_fp80 @fidiv_fp80_i32(x86_fp80 %a0, i32 %a1) {
485 ; X86-LABEL: fidiv_fp80_i32:
487 ; X86-NEXT: pushl %eax
488 ; X86-NEXT: .cfi_def_cfa_offset 8
489 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
490 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
491 ; X86-NEXT: movl %eax, (%esp)
492 ; X86-NEXT: fidivl (%esp)
493 ; X86-NEXT: popl %eax
494 ; X86-NEXT: .cfi_def_cfa_offset 4
497 ; X64-LABEL: fidiv_fp80_i32:
499 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
500 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
501 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
503 %1 = sitofp i32 %a1 to x86_fp80
504 %2 = fdiv x86_fp80 %a0, %1
508 define x86_fp80 @fidiv_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
509 ; X86-LABEL: fidiv_fp80_i32_ld:
511 ; X86-NEXT: pushl %eax
512 ; X86-NEXT: .cfi_def_cfa_offset 8
513 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
514 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
515 ; X86-NEXT: movl (%eax), %eax
516 ; X86-NEXT: movl %eax, (%esp)
517 ; X86-NEXT: fidivl (%esp)
518 ; X86-NEXT: popl %eax
519 ; X86-NEXT: .cfi_def_cfa_offset 4
522 ; X64-LABEL: fidiv_fp80_i32_ld:
524 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
525 ; X64-NEXT: movl (%rdi), %eax
526 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
527 ; X64-NEXT: fidivl -{{[0-9]+}}(%rsp)
529 %1 = load i32, ptr%a1
530 %2 = sitofp i32 %1 to x86_fp80
531 %3 = fdiv x86_fp80 %a0, %2
539 define x86_fp80 @fidivr_fp80_i16(x86_fp80 %a0, i16 %a1) {
540 ; X86-LABEL: fidivr_fp80_i16:
542 ; X86-NEXT: pushl %eax
543 ; X86-NEXT: .cfi_def_cfa_offset 8
544 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
545 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
546 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
547 ; X86-NEXT: fidivrs {{[0-9]+}}(%esp)
548 ; X86-NEXT: popl %eax
549 ; X86-NEXT: .cfi_def_cfa_offset 4
552 ; X64-LABEL: fidivr_fp80_i16:
554 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
555 ; X64-NEXT: movw %di, -{{[0-9]+}}(%rsp)
556 ; X64-NEXT: fidivrs -{{[0-9]+}}(%rsp)
558 %1 = sitofp i16 %a1 to x86_fp80
559 %2 = fdiv x86_fp80 %1, %a0
563 define x86_fp80 @fidivr_fp80_i16_ld(x86_fp80 %a0, ptr%a1) {
564 ; X86-LABEL: fidivr_fp80_i16_ld:
566 ; X86-NEXT: pushl %eax
567 ; X86-NEXT: .cfi_def_cfa_offset 8
568 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
569 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
570 ; X86-NEXT: movzwl (%eax), %eax
571 ; X86-NEXT: movw %ax, {{[0-9]+}}(%esp)
572 ; X86-NEXT: fidivrs {{[0-9]+}}(%esp)
573 ; X86-NEXT: popl %eax
574 ; X86-NEXT: .cfi_def_cfa_offset 4
577 ; X64-LABEL: fidivr_fp80_i16_ld:
579 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
580 ; X64-NEXT: movzwl (%rdi), %eax
581 ; X64-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
582 ; X64-NEXT: fidivrs -{{[0-9]+}}(%rsp)
584 %1 = load i16, ptr%a1
585 %2 = sitofp i16 %1 to x86_fp80
586 %3 = fdiv x86_fp80 %2, %a0
590 define x86_fp80 @fidivr_fp80_i32(x86_fp80 %a0, i32 %a1) {
591 ; X86-LABEL: fidivr_fp80_i32:
593 ; X86-NEXT: pushl %eax
594 ; X86-NEXT: .cfi_def_cfa_offset 8
595 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
596 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
597 ; X86-NEXT: movl %eax, (%esp)
598 ; X86-NEXT: fidivrl (%esp)
599 ; X86-NEXT: popl %eax
600 ; X86-NEXT: .cfi_def_cfa_offset 4
603 ; X64-LABEL: fidivr_fp80_i32:
605 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
606 ; X64-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
607 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
609 %1 = sitofp i32 %a1 to x86_fp80
610 %2 = fdiv x86_fp80 %1, %a0
614 define x86_fp80 @fidivr_fp80_i32_ld(x86_fp80 %a0, ptr%a1) {
615 ; X86-LABEL: fidivr_fp80_i32_ld:
617 ; X86-NEXT: pushl %eax
618 ; X86-NEXT: .cfi_def_cfa_offset 8
619 ; X86-NEXT: fldt {{[0-9]+}}(%esp)
620 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
621 ; X86-NEXT: movl (%eax), %eax
622 ; X86-NEXT: movl %eax, (%esp)
623 ; X86-NEXT: fidivrl (%esp)
624 ; X86-NEXT: popl %eax
625 ; X86-NEXT: .cfi_def_cfa_offset 4
628 ; X64-LABEL: fidivr_fp80_i32_ld:
630 ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
631 ; X64-NEXT: movl (%rdi), %eax
632 ; X64-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
633 ; X64-NEXT: fidivrl -{{[0-9]+}}(%rsp)
635 %1 = load i32, ptr%a1
636 %2 = sitofp i32 %1 to x86_fp80
637 %3 = fdiv x86_fp80 %2, %a0