1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -x86-asm-syntax=att -mattr=-sse2 | FileCheck %s
4 define fastcc double @sint64_to_fp(i64 %X) {
5 ; CHECK-LABEL: sint64_to_fp:
7 ; CHECK-NEXT: pushl %ebp
8 ; CHECK-NEXT: .cfi_def_cfa_offset 8
9 ; CHECK-NEXT: .cfi_offset %ebp, -8
10 ; CHECK-NEXT: movl %esp, %ebp
11 ; CHECK-NEXT: .cfi_def_cfa_register %ebp
12 ; CHECK-NEXT: andl $-8, %esp
13 ; CHECK-NEXT: subl $8, %esp
14 ; CHECK-NEXT: movl %edx, {{[0-9]+}}(%esp)
15 ; CHECK-NEXT: movl %ecx, (%esp)
16 ; CHECK-NEXT: fildll (%esp)
17 ; CHECK-NEXT: movl %ebp, %esp
18 ; CHECK-NEXT: popl %ebp
19 ; CHECK-NEXT: .cfi_def_cfa %esp, 4
21 %R = sitofp i64 %X to double ; <double> [#uses=1]
25 define fastcc double @uint64_to_fp(i64 %X) {
26 ; CHECK-LABEL: uint64_to_fp:
28 ; CHECK-NEXT: pushl %ebp
29 ; CHECK-NEXT: .cfi_def_cfa_offset 8
30 ; CHECK-NEXT: .cfi_offset %ebp, -8
31 ; CHECK-NEXT: movl %esp, %ebp
32 ; CHECK-NEXT: .cfi_def_cfa_register %ebp
33 ; CHECK-NEXT: andl $-8, %esp
34 ; CHECK-NEXT: subl $16, %esp
35 ; CHECK-NEXT: movl %edx, {{[0-9]+}}(%esp)
36 ; CHECK-NEXT: movl %ecx, (%esp)
37 ; CHECK-NEXT: shrl $31, %edx
38 ; CHECK-NEXT: fildll (%esp)
39 ; CHECK-NEXT: fadds {{\.?LCPI[0-9]+_[0-9]+}}(,%edx,4)
40 ; CHECK-NEXT: fstpl {{[0-9]+}}(%esp)
41 ; CHECK-NEXT: fldl {{[0-9]+}}(%esp)
42 ; CHECK-NEXT: movl %ebp, %esp
43 ; CHECK-NEXT: popl %ebp
44 ; CHECK-NEXT: .cfi_def_cfa %esp, 4
46 %R = uitofp i64 %X to double ; <double> [#uses=1]