add a note
authorChris Lattner <sabre@nondot.org>
Fri, 2 Mar 2007 05:04:52 +0000 (05:04 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 2 Mar 2007 05:04:52 +0000 (05:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34837 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 554c49beba1e54db7a8342421ec5ea4aa032af1c..1c067f537177d37f9c06ae5b7c7ba584818dc12b 100644 (file)
@@ -920,3 +920,25 @@ LBB1_1:
 Though this probably isn't worth it.
 
 //===---------------------------------------------------------------------===//
+
+We need to teach the codegen to convert two-address INC instructions to LEA
+when the flags are dead.  For example, on X86-64, compile:
+
+int foo(int A, int B) {
+  return A+1;
+}
+
+to:
+
+_foo:
+        leal    1(%edi), %eax
+        ret
+
+instead of:
+
+_foo:
+        incl %edi
+        movl %edi, %eax
+        ret
+
+//===---------------------------------------------------------------------===//