add a note :(
authorChris Lattner <sabre@nondot.org>
Wed, 4 Oct 2006 05:52:13 +0000 (05:52 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Oct 2006 05:52:13 +0000 (05:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30717 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README-SSE.txt

index e019afa966fc7603301269febe4db3810b5eb20d..a22cebf165f8dc61a0b9b0d419b1337496f96e55 100644 (file)
@@ -4,6 +4,30 @@
 
 //===---------------------------------------------------------------------===//
 
+There are serious issues folding loads into "scalar sse" intrinsics.  For
+example, this:
+
+float minss4( float x, float *y ) { 
+  return _mm_cvtss_f32(_mm_min_ss(_mm_set_ss(x),_mm_set_ss(*y)));
+}
+
+compiles to:
+
+_minss4:
+        subl $4, %esp
+        movl 12(%esp), %eax
+***     movss 8(%esp), %xmm0
+***     movss (%eax), %xmm1
+***     minss %xmm1, %xmm0
+        movss %xmm0, (%esp)
+        flds (%esp)
+        addl $4, %esp
+        ret
+
+Each operand of the minss is a load.  At least one should be folded!
+
+//===---------------------------------------------------------------------===//
+
 When compiled with unsafemath enabled, "main" should enable SSE DAZ mode and
 other fast SSE modes.