add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-05-13 18:48:54 +00:00
parent c3dac5cbfe
commit 7171c836a9

View File

@ -764,4 +764,28 @@ madd:
//===---------------------------------------------------------------------===//
Consider:
#include <emmintrin.h>
__m128 foo2 (float x) {
return _mm_set_ps (0, 0, x, 0);
}
In x86-32 mode, we generate this spiffy code:
_foo2:
movss 4(%esp), %xmm0
pshufd $81, %xmm0, %xmm0
ret
in x86-64 mode, we generate this code, which could be better:
_foo2:
xorps %xmm1, %xmm1
movss %xmm0, %xmm1
pshufd $81, %xmm1, %xmm0
ret
In sse4 mode, we could use insertps to make both better.
//===---------------------------------------------------------------------===//