[llvm-commits] [llvm] r51491 - /llvm/trunk/lib/Target/X86/README-SSE.txt

Dan Gohman gohman at apple.com
Fri May 23 11:05:39 PDT 2008


Author: djg
Date: Fri May 23 13:05:39 2008
New Revision: 51491

URL: http://llvm.org/viewvc/llvm-project?rev=51491&view=rev
Log:
Elaborate on the entry on integer vector multiplication by constants.

Modified:
    llvm/trunk/lib/Target/X86/README-SSE.txt

Modified: llvm/trunk/lib/Target/X86/README-SSE.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51491&r1=51490&r2=51491&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
+++ llvm/trunk/lib/Target/X86/README-SSE.txt Fri May 23 13:05:39 2008
@@ -814,7 +814,7 @@
 	ret <4 x i32> %A
 }
 
-Compiles into:
+On targets without SSE4.1, this compiles into:
 
 LCPI1_0:					##  <4 x i32>
 	.long	10
@@ -846,6 +846,11 @@
 	punpckldq	%xmm2, %xmm0
 	ret
 
+It would be better to synthesize integer vector multiplication by constants
+using shifts and adds, pslld and paddd here. And even on targets with SSE4.1,
+simple cases such as multiplication by powers of two would be better as
+vector shifts than as multiplications.
+
 //===---------------------------------------------------------------------===//
 
 We compile this:





More information about the llvm-commits mailing list