add a note
authorChris Lattner <sabre@nondot.org>
Tue, 10 Jul 2007 20:03:50 +0000 (20:03 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 10 Jul 2007 20:03:50 +0000 (20:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38507 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README-SSE.txt

index 08dcc278a1b894ea4849b1c010ef68d2b97b8d99..20e6a53267ed26b15ee5682b3dd367fe9388f1e6 100644 (file)
@@ -572,3 +572,29 @@ swizzle:
         ret
 
 //===---------------------------------------------------------------------===//
+
+This code:
+
+#include <emmintrin.h>
+__m128i test(long long i) { return _mm_cvtsi64x_si128(i); }
+
+Should turn into a single 'movq %rdi, %xmm0' instruction.  Instead, we 
+get this (on x86-64):
+
+_test:
+       movd %rdi, %xmm1
+       xorps %xmm0, %xmm0
+       movsd %xmm1, %xmm0
+       ret
+
+The LLVM IR is:
+
+target triple = "x86_64-apple-darwin8"
+define <2 x i64> @test(i64 %i) {
+entry:
+       %tmp10 = insertelement <2 x i64> undef, i64 %i, i32 0   
+       %tmp11 = insertelement <2 x i64> %tmp10, i64 0, i32 1
+       ret <2 x i64> %tmp11
+}
+
+//===---------------------------------------------------------------------===//