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 | 4d5275905e27e7df5a8cd4f896f3b5e05959348f (patch) | |
tree | e8ca770f721d37b583626b91f73316384475b3a2 /clang/lib/Basic/SourceLocation.cpp | |
parent | 800979259eaf99023bedafe281e3deca2f3a3310 (diff) | |
download | llvm-4d5275905e27e7df5a8cd4f896f3b5e05959348f.zip llvm-4d5275905e27e7df5a8cd4f896f3b5e05959348f.tar.gz llvm-4d5275905e27e7df5a8cd4f896f3b5e05959348f.tar.bz2 |
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.
llvm-svn: 62404
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
0 files changed, 0 insertions, 0 deletions