[llvm-commits] CVS: llvm/lib/Target/X86/README-SSE.txt
Chris Lattner
sabre at nondot.org
Tue Feb 27 09:21:26 PST 2007
Changes in directory llvm/lib/Target/X86:
README-SSE.txt updated: 1.14 -> 1.15
---
Log message:
a note
---
Diffs of the changes: (+42 -0)
README-SSE.txt | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+)
Index: llvm/lib/Target/X86/README-SSE.txt
diff -u llvm/lib/Target/X86/README-SSE.txt:1.14 llvm/lib/Target/X86/README-SSE.txt:1.15
--- llvm/lib/Target/X86/README-SSE.txt:1.14 Thu Dec 14 23:50:39 2006
+++ llvm/lib/Target/X86/README-SSE.txt Tue Feb 27 11:21:09 2007
@@ -530,3 +530,45 @@
Floating point max / min are commutable when -enable-unsafe-fp-path is
specified. We should turn int_x86_sse_max_ss and X86ISD::FMIN etc. into other
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
+
+
More information about the llvm-commits
mailing list