Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.98 -> 1.99 --- Log message: A couple of new entries. --- Diffs of the changes: (+37 -0) README.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.98 llvm/lib/Target/X86/README.txt:1.99 --- llvm/lib/Target/X86/README.txt:1.98 Mon Apr 24 18:30:10 2006 +++ llvm/lib/Target/X86/README.txt Thu Apr 27 03:31:33 2006 @@ -1107,3 +1107,40 @@ 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. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits