diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-05-23 21:23:16 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-05-23 21:23:16 +0000 |
commit | 2b2a7013c4f12c078f826e0dd6289c3d2a175a9b (patch) | |
tree | 57d4d609a1f5d2cfc38d5c26f9ff669ef7b7598e /lib/Target/X86/README-SSE.txt | |
parent | e1688b6bb07590cea26faa06a7c3ae227252131b (diff) | |
download | external_llvm-2b2a7013c4f12c078f826e0dd6289c3d2a175a9b.zip external_llvm-2b2a7013c4f12c078f826e0dd6289c3d2a175a9b.tar.gz external_llvm-2b2a7013c4f12c078f826e0dd6289c3d2a175a9b.tar.bz2 |
Use movlps / movhps to modify low / high half of 16-byet memory location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README-SSE.txt')
-rw-r--r-- | lib/Target/X86/README-SSE.txt | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/Target/X86/README-SSE.txt b/lib/Target/X86/README-SSE.txt index 1f5f203..58b4384 100644 --- a/lib/Target/X86/README-SSE.txt +++ b/lib/Target/X86/README-SSE.txt @@ -505,46 +505,6 @@ nodes which are selected to max / min instructions that are marked commutable. //===---------------------------------------------------------------------===// -We should compile this: -#include <xmmintrin.h> -typedef union { - int i[4]; - float f[4]; - __m128 v; -} vector4_t; -void swizzle (const void *a, vector4_t * b, vector4_t * c) { - b->v = _mm_loadl_pi (b->v, (__m64 *) a); - c->v = _mm_loadl_pi (c->v, ((__m64 *) a) + 1); -} - -to: - -_swizzle: - movl 4(%esp), %eax - movl 8(%esp), %edx - movl 12(%esp), %ecx - movlps (%eax), %xmm0 - movlps %xmm0, (%edx) - movlps 8(%eax), %xmm0 - movlps %xmm0, (%ecx) - ret - -not: - -swizzle: - movl 8(%esp), %eax - movaps (%eax), %xmm0 - movl 4(%esp), %ecx - movlps (%ecx), %xmm0 - movaps %xmm0, (%eax) - movl 12(%esp), %eax - movaps (%eax), %xmm0 - movlps 8(%ecx), %xmm0 - movaps %xmm0, (%eax) - ret - -//===---------------------------------------------------------------------===// - We should materialize vector constants like "all ones" and "signbit" with code like: |