[llvm-commits] CVS: llvm/lib/Target/X86/README.txt

Chris Lattner lattner at cs.uiuc.edu
Mon Apr 10 14:51:16 PDT 2006



Changes in directory llvm/lib/Target/X86:

README.txt updated: 1.84 -> 1.85
---
Log message:

add a note


---
Diffs of the changes:  (+23 -0)

 README.txt |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+)


Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.84 llvm/lib/Target/X86/README.txt:1.85
--- llvm/lib/Target/X86/README.txt:1.84	Mon Apr 10 16:42:57 2006
+++ llvm/lib/Target/X86/README.txt	Mon Apr 10 16:51:03 2006
@@ -675,6 +675,29 @@
 
 //===---------------------------------------------------------------------===//
 
+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) {






More information about the llvm-commits mailing list