diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-01-17 03:56:04 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-01-17 03:56:04 +0000 |
commit | 8b8a6368437abea4e4adb9afab455727f2da6624 (patch) | |
tree | abc7fb6a4408e077e38da10d97f40734387c3e9d /lib/CodeGen/AsmPrinter/DwarfWriter.cpp | |
parent | 70fd453a02783fe4044ea6f042b560796c9454ae (diff) |
Implement a special algorithm for converting uint_to_fp for i32 values on
X86. This code:
void f() {
uint32_t x;
float y = (float)x;
}
used to be:
movl %eax, -8(%ebp)
movl [2^52 double], -4(%ebp)
movsd -8(%ebp), %xmm0
subsd [2^52 double], %xmm0
cvtsd2ss %xmm0, %xmm0
Is now:
movsd [2^52 double], %xmm0
movsd %xmm0, %xmm1
movd %ecx, %xmm2
orps %xmm2, %xmm1
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
This is faster on X86. Note that there's an extra load of %xmm0 into %xmm1. That
will be fixed in a later coalescer fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
0 files changed, 0 insertions, 0 deletions