summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-18 16:48:14 +0000
committerChris Lattner <sabre@nondot.org>2007-12-18 16:48:14 +0000
commit2583a66295539240bda71f452d41c28e4a527448 (patch)
tree0a3acea2f1491e92fcfae3ea2216b6aec23a15da /llvm/lib
parent3353ed09ace5affb4448ea387dc676734ed94e10 (diff)
downloadbcm5719-llvm-2583a66295539240bda71f452d41c28e4a527448.tar.gz
bcm5719-llvm-2583a66295539240bda71f452d41c28e4a527448.zip
add an obvious load folding missed optzn.
llvm-svn: 45161
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/README.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index 7705c1ba31e..8effd47766b 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/lib/Target/X86/README.txt
@@ -1552,3 +1552,24 @@ _foo:
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
+
+//===---------------------------------------------------------------------===//
+
OpenPOWER on IntegriCloud