diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-14 22:29:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-14 22:29:23 +0000 |
commit | b37fb6a0da18af43afa6264ed5773662ec16684d (patch) | |
tree | 8232dc67e0c6941b53a0184c37c68632c798db1c /llvm/test/Integer | |
parent | 8a08819105fc6640d84b34de673c36f748c98557 (diff) | |
download | bcm5719-llvm-b37fb6a0da18af43afa6264ed5773662ec16684d.tar.gz bcm5719-llvm-b37fb6a0da18af43afa6264ed5773662ec16684d.zip |
Implement InstCombine/vec_demanded_elts.ll:test2. This allows us to turn
unsigned test(float f) {
return _mm_cvtsi128_si32( (__m128i) _mm_set_ss( f*f ));
}
into:
_test:
movss 4(%esp), %xmm0
mulss %xmm0, %xmm0
movd %xmm0, %eax
ret
instead of:
_test:
movss 4(%esp), %xmm0
mulss %xmm0, %xmm0
xorps %xmm1, %xmm1
movss %xmm0, %xmm1
movd %xmm1, %eax
ret
GCC gets:
_test:
subl $28, %esp
movss 32(%esp), %xmm0
mulss %xmm0, %xmm0
xorps %xmm1, %xmm1
movss %xmm0, %xmm1
movaps %xmm1, %xmm0
movd %xmm0, 12(%esp)
movl 12(%esp), %eax
addl $28, %esp
ret
llvm-svn: 36020
Diffstat (limited to 'llvm/test/Integer')
0 files changed, 0 insertions, 0 deletions