From fc2f52128a106c99b0f2388f9954119dc29701fd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 2 Mar 2007 05:04:52 +0000 Subject: [PATCH] add a note llvm-svn: 34837 --- llvm/lib/Target/X86/README.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 554c49beba1e..1c067f537177 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -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 + +//===---------------------------------------------------------------------===//