diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-03-22 18:42:45 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-03-22 18:42:45 +0000 |
commit | a348c56fdee38b4d52c4e54ca9d8bea799dda345 (patch) | |
tree | 85300ea32c7704cb987f4ac4b06dfdad7865149b /lib/Target/X86/README-SSE.txt | |
parent | ecb7a77885b174cf4d001a9b48533b3979e7810d (diff) | |
download | external_llvm-a348c56fdee38b4d52c4e54ca9d8bea799dda345.zip external_llvm-a348c56fdee38b4d52c4e54ca9d8bea799dda345.tar.gz external_llvm-a348c56fdee38b4d52c4e54ca9d8bea799dda345.tar.bz2 |
Support added for shifts and unpacking MMX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35266 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, 40 insertions, 0 deletions
diff --git a/lib/Target/X86/README-SSE.txt b/lib/Target/X86/README-SSE.txt index 2b7f9ae..96e6aab 100644 --- a/lib/Target/X86/README-SSE.txt +++ b/lib/Target/X86/README-SSE.txt @@ -571,4 +571,44 @@ swizzle: movaps %xmm0, (%eax) ret +//===---------------------------------------------------------------------===// + +We should compile this: + +#include <xmmintrin.h> + +void foo(__m128i *A, __m128i *B) { + *A = _mm_sll_epi16 (*A, *B); +} + +to: + +_foo: + subl $12, %esp + movl 16(%esp), %edx + movl 20(%esp), %eax + movdqa (%edx), %xmm1 + movdqa (%eax), %xmm0 + psllw %xmm0, %xmm1 + movdqa %xmm1, (%edx) + addl $12, %esp + ret +not: + +_foo: + movl 8(%esp), %eax + movdqa (%eax), %xmm0 + #IMPLICIT_DEF %eax + pinsrw $2, %eax, %xmm0 + xorl %ecx, %ecx + pinsrw $3, %ecx, %xmm0 + pinsrw $4, %eax, %xmm0 + pinsrw $5, %ecx, %xmm0 + pinsrw $6, %eax, %xmm0 + pinsrw $7, %ecx, %xmm0 + movl 4(%esp), %eax + movdqa (%eax), %xmm1 + psllw %xmm0, %xmm1 + movdqa %xmm1, (%eax) + ret |