[llvm-commits] [llvm] r45766 - /llvm/trunk/lib/Target/README.txt

Chris Lattner sabre at nondot.org
Tue Jan 8 16:17:57 PST 2008


Author: lattner
Date: Tue Jan  8 18:17:57 2008
New Revision: 45766

URL: http://llvm.org/viewvc/llvm-project?rev=45766&view=rev
Log:
add a note

Modified:
    llvm/trunk/lib/Target/README.txt

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

==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Tue Jan  8 18:17:57 2008
@@ -524,3 +524,24 @@
 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.
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list