fix x86-64 static codegen to materialize the address of a global with movl instead
authorChris Lattner <sabre@nondot.org>
Sat, 11 Jul 2009 23:17:29 +0000 (23:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 11 Jul 2009 23:17:29 +0000 (23:17 +0000)
commit65a7a6f7a3a9fc5fd2e50200c81a6ec00a78ffd3
tree68b2b18bc37741d05f80c7764b1094b747df8638
parent14f7511f46ed61b0dbaaf566e1170f40b9663924
fix x86-64 static codegen to materialize the address of a global with movl instead
of lea.  It is better for code size (and presumably efficiency) to use:

  movl $foo, %eax

rather than:

  leal foo, eax

Both give a nice zero extending "move immediate" instruction, the former is just
smaller.  Note that global addresses should be handled different by the x86
backend, but I chose to follow the style already in place and add more fixme's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86Instr64bit.td
test/CodeGen/X86/abi-isel.ll