[llvm-commits] [llvm] r112109 - /llvm/trunk/lib/Target/X86/README-SSE.txt
Chris Lattner
sabre at nondot.org
Wed Aug 25 16:31:42 PDT 2010
Author: lattner
Date: Wed Aug 25 18:31:42 2010
New Revision: 112109
URL: http://llvm.org/viewvc/llvm-project?rev=112109&view=rev
Log:
we should pattern match the SSE complex arithmetic ops.
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=112109&r1=112108&r2=112109&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
+++ llvm/trunk/lib/Target/X86/README-SSE.txt Wed Aug 25 18:31:42 2010
@@ -19,6 +19,32 @@
//===---------------------------------------------------------------------===//
+SSE has instructions for doing operations on complex numbers, we should pattern
+match them. Compiling this:
+
+_Complex float f32(_Complex float A, _Complex float B) {
+ return A+B;
+}
+
+into:
+
+_f32:
+ movdqa %xmm0, %xmm2
+ addss %xmm1, %xmm2
+ pshufd $16, %xmm2, %xmm2
+ pshufd $1, %xmm1, %xmm1
+ pshufd $1, %xmm0, %xmm0
+ addss %xmm1, %xmm0
+ pshufd $16, %xmm0, %xmm1
+ movdqa %xmm2, %xmm0
+ unpcklps %xmm1, %xmm0
+ ret
+
+seems silly.
+
+
+//===---------------------------------------------------------------------===//
+
Expand libm rounding functions inline: Significant speedups possible.
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00909.html
More information about the llvm-commits
mailing list