aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-05 01:15:18 +0000
committerChris Lattner <sabre@nondot.org>2006-03-05 01:15:18 +0000
commita4929df2dadbf6b027106088f38282b0e0d51ee2 (patch)
tree90477ac1a75d17899f905ec433d3bd57486edfab
parent220b0cf3e4ceb58d4f114f8cfc163e1f5836ab91 (diff)
downloadexternal_llvm-a4929df2dadbf6b027106088f38282b0e0d51ee2.zip
external_llvm-a4929df2dadbf6b027106088f38282b0e0d51ee2.tar.gz
external_llvm-a4929df2dadbf6b027106088f38282b0e0d51ee2.tar.bz2
add a note for something evan noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26539 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/README.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index e1bceb1..3e2eaef 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -538,3 +538,31 @@ Currently the load folding imull has a higher complexity than the LEA32 pattern.
Lower memcpy / memset to a series of SSE 128 bit move instructions when it's
feasible.
+
+//===---------------------------------------------------------------------===//
+
+Teach the coallescer to commute 2-addr instructions, allowing us to eliminate
+the reg-reg copy in this example:
+
+float foo(int *x, float *y, unsigned c) {
+ float res = 0.0;
+ unsigned i;
+ for (i = 0; i < c; i++) {
+ float xx = (float)x[i];
+ xx = xx * y[i];
+ xx += res;
+ res = xx;
+ }
+ return res;
+}
+
+LBB_foo_3: # no_exit
+ cvtsi2ss %XMM0, DWORD PTR [%EDX + 4*%ESI]
+ mulss %XMM0, DWORD PTR [%EAX + 4*%ESI]
+ addss %XMM0, %XMM1
+ inc %ESI
+ cmp %ESI, %ECX
+**** movaps %XMM1, %XMM0
+ jb LBB_foo_3 # no_exit
+
+//===---------------------------------------------------------------------===//