aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-04-27 08:31:33 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-04-27 08:31:33 +0000
commit43824e821631c76cc17de9f99c037f7673aafbd8 (patch)
treea111b0efec22a6a85c246b60388c8a0f2b63c75a
parent2fdd95eee79b66c9ae3cbe43c0db48eba48e116d (diff)
A couple of new entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27993 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/README.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 4016e4ee7a..4dd7238b6f 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -1107,3 +1107,40 @@ icc generates:
So icc is smart enough to know that B is in memory so it doesn't load it and
store it back to stack.
+
+//===---------------------------------------------------------------------===//
+
+__m128d test1( __m128d A, __m128d B) {
+ return _mm_shuffle_pd(A, B, 0x3);
+}
+
+compiles to
+
+shufpd $3, %xmm1, %xmm0
+
+Perhaps it's better to use unpckhpd instead?
+
+unpckhpd %xmm1, %xmm0
+
+Don't know if unpckhpd is faster. But it is shorter.
+
+//===---------------------------------------------------------------------===//
+
+typedef short v8i16 __attribute__ ((__vector_size__ (16)));
+v8i16 test(v8i16 x, v8i16 y) {
+ return x + y;
+}
+
+compiles to
+
+_test:
+ paddw %xmm0, %xmm1
+ movaps %xmm1, %xmm0
+ ret
+
+It should be
+
+ paddw %xmm1, %xmm0
+ ret
+
+since paddw is commutative.