[llvm-commits] [llvm] r50681 - /llvm/trunk/lib/Target/X86/README.txt
Chris Lattner
sabre at nondot.org
Mon May 5 16:19:45 PDT 2008
Author: lattner
Date: Mon May 5 18:19:45 2008
New Revision: 50681
URL: http://llvm.org/viewvc/llvm-project?rev=50681&view=rev
Log:
add a micro 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=50681&r1=50680&r2=50681&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Mon May 5 18:19:45 2008
@@ -1691,3 +1691,21 @@
...
//===---------------------------------------------------------------------===//
+
+We compile:
+
+int test(int x, int y) {
+ return x-y-1;
+}
+
+into (-m64):
+
+_test:
+ decl %edi
+ movl %edi, %eax
+ subl %esi, %eax
+ ret
+
+it would be better to codegen as: x+~y (notl+addl)
+
+//===---------------------------------------------------------------------===//
More information about the llvm-commits
mailing list