aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-10 21:51:03 +0000
committerChris Lattner <sabre@nondot.org>2006-04-10 21:51:03 +0000
commita956db2a6351927938a4d9960b496f15db4843c2 (patch)
tree56b683a0fa3c482c07e8a47d6610ff689771e97b /lib
parent8ebd7f937b2a83515cd30467f5ff808a9c139da1 (diff)
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/README.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 9db0cef4bd..f9d36434ba 100644
--- a/lib/Target/X86/README.txt
+++ b/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) {