aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-25 23:31:42 +0000
committerChris Lattner <sabre@nondot.org>2010-08-25 23:31:42 +0000
commit1a68958d3d9233bfe512de8ea7137067ef660345 (patch)
tree90dd2a047707cd718a721ce3b2d3e9044b5cf967 /lib/Target
parent709d59255a3100c7d440c93069efa1f726677a27 (diff)
downloadexternal_llvm-1a68958d3d9233bfe512de8ea7137067ef660345.zip
external_llvm-1a68958d3d9233bfe512de8ea7137067ef660345.tar.gz
external_llvm-1a68958d3d9233bfe512de8ea7137067ef660345.tar.bz2
we should pattern match the SSE complex arithmetic ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/README-SSE.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/Target/X86/README-SSE.txt b/lib/Target/X86/README-SSE.txt
index 85cdd17..f96b22f 100644
--- a/lib/Target/X86/README-SSE.txt
+++ b/lib/Target/X86/README-SSE.txt
@@ -19,6 +19,32 @@ __m128i shift_right(__m128i value, unsigned long offset) {
//===---------------------------------------------------------------------===//
+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