diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-04-10 21:51:03 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-04-10 21:51:03 +0000 | 
| commit | d99f57c1e1954feb212fab688bba9757efea2cce (patch) | |
| tree | 1af6250e83b07ee2ad2980e07bfcd58a053789c7 /llvm/lib | |
| parent | 3df07813a58ac75aa0aa771c59879779f05f3175 (diff) | |
| download | bcm5719-llvm-d99f57c1e1954feb212fab688bba9757efea2cce.tar.gz bcm5719-llvm-d99f57c1e1954feb212fab688bba9757efea2cce.zip  | |
add a note
llvm-svn: 27567
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/README.txt | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 9db0cef4bd4..f9d36434ba2 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -675,6 +675,29 @@ Perhaps use pxor / xorp* to clear a XMM register first?  //===---------------------------------------------------------------------===// +Better codegen for: + +void f(float a, float b, vector float * out) { *out = (vector float){ a, 0.0, 0.0, b}; } +void f(float a, float b, vector float * out) { *out = (vector float){ a, b, 0.0, 0}; } + +For the later we generate: + +_f: +        pxor %xmm0, %xmm0 +        movss 8(%esp), %xmm1 +        movaps %xmm0, %xmm2 +        unpcklps %xmm1, %xmm2 +        movss 4(%esp), %xmm1 +        unpcklps %xmm0, %xmm1 +        unpcklps %xmm2, %xmm1 +        movl 12(%esp), %eax +        movaps %xmm1, (%eax) +        ret + +This seems like it should use shufps, one for each of a & b. + +//===---------------------------------------------------------------------===// +  Adding to the list of cmp / test poor codegen issues:  int test(__m128 *A, __m128 *B) {  | 

