aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-09 00:17:57 +0000
committerChris Lattner <sabre@nondot.org>2008-01-09 00:17:57 +0000
commitf61b63ec5b36857f34d3ec93afcd53557369373c (patch)
tree7be00a30a05785159213eb241a5d726cba6bcaaa
parent07649d9265c9a378fe753f80601ae5f4de3312dc (diff)
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45766 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/README.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index e6178894af..b331acf032 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -524,3 +524,24 @@ Investigate lowering of sparse switch statements into perfect hash tables:
http://burtleburtle.net/bob/hash/perfect.html
//===---------------------------------------------------------------------===//
+
+We should turn things like "load+fabs+store" and "load+fneg+store" into the
+corresponding integer operations. On a yonah, this loop:
+
+double a[256];
+ for (b = 0; b < 10000000; b++)
+ for (i = 0; i < 256; i++)
+ a[i] = -a[i];
+
+is twice as slow as this loop:
+
+long long a[256];
+ for (b = 0; b < 10000000; b++)
+ for (i = 0; i < 256; i++)
+ a[i] ^= (1ULL << 63);
+
+and I suspect other processors are similar. On X86 in particular this is a
+big win because doing this with integers allows the use of read/modify/write
+instructions.
+
+//===---------------------------------------------------------------------===//