diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-07-16 02:02:34 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-07-16 02:02:34 +0000 |
commit | 5a8441ea3fc145393d6274156bd05c4a006099ea (patch) | |
tree | cc5a8d6efc77c3e61d52510456c108fd2b4c9f27 /lib/CodeGen/ELFWriter.cpp | |
parent | 11cefd926a1be9e6cd52b4e189a99081a385d57f (diff) |
Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP that
the target natively supports. This eliminates some special-case code from
the x86 backend and generates better code as well.
For an i8 to f64 conversion, before & after:
_x87 before:
subl $2, %esp
movb 6(%esp), %al
movsbw %al, %ax
movw %ax, (%esp)
filds (%esp)
addl $2, %esp
ret
_x87 after:
subl $2, %esp
movsbw 6(%esp), %ax
movw %ax, (%esp)
filds (%esp)
addl $2, %esp
ret
_sse before:
subl $12, %esp
movb 16(%esp), %al
movsbl %al, %eax
cvtsi2sd %eax, %xmm0
addl $12, %esp
ret
_sse after:
subl $12, %esp
movsbl 16(%esp), %eax
cvtsi2sd %eax, %xmm0
addl $12, %esp
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELFWriter.cpp')
0 files changed, 0 insertions, 0 deletions