diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-08-14 04:36:51 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-08-14 04:36:51 +0000 |
commit | 875f360e227a28feeed77e197038fa61beb97652 (patch) | |
tree | f8403056c94397cbc43c2533e09f61afd53642a1 /lib/Target/PowerPC/PPCISelPattern.cpp | |
parent | d2558e3e4af2930730e2314868afd09ba005e282 (diff) |
Fix FP_TO_UINT with Scalar SSE2 now that the legalizer can handle it. We
now generate the relatively good code sequences:
unsigned short foo(float a) { return a; }
_foo:
movss 4(%esp), %xmm0
cvttss2si %xmm0, %eax
movzwl %ax, %eax
ret
and
unsigned bar(float a) { return a; }
_bar:
movss .CPI_bar_0, %xmm0
movss 4(%esp), %xmm1
movapd %xmm1, %xmm2
subss %xmm0, %xmm2
cvttss2si %xmm2, %eax
xorl $-2147483648, %eax
cvttss2si %xmm1, %ecx
ucomiss %xmm0, %xmm1
cmovb %ecx, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelPattern.cpp')
0 files changed, 0 insertions, 0 deletions