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

Chris Lattner sabre at nondot.org
Tue Dec 18 08:48:15 PST 2007


Author: lattner
Date: Tue Dec 18 10:48:14 2007
New Revision: 45161

URL: http://llvm.org/viewvc/llvm-project?rev=45161&view=rev
Log:
add an obvious load folding missed optzn.

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

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

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Tue Dec 18 10:48:14 2007
@@ -1552,3 +1552,24 @@
         andl    $65535, %eax
         ret
 
+//===---------------------------------------------------------------------===//
+
+We're missing an obvious fold of a load into imul:
+
+int test(long a, long b) { return a * b; } 
+
+LLVM produces:
+_test:
+        movl    4(%esp), %ecx
+        movl    8(%esp), %eax
+        imull   %ecx, %eax
+        ret
+
+vs:
+_test:
+        movl    8(%esp), %eax
+        imull   4(%esp), %eax
+        ret
+
+//===---------------------------------------------------------------------===//
+





More information about the llvm-commits mailing list