OSDN Git Service

[X86] Replace LEAs with INC/DEC when profitable
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 11 Nov 2015 11:44:31 +0000 (11:44 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 11 Nov 2015 11:44:31 +0000 (11:44 +0000)
commit4c37e73bc8524f60d5a29731cfcb85560e03025a
tree9d9b17727822945146abeacb982ee9d8050d4ecb
parent2660d58a7505bec548df94ea1675a358ae47f69d
[X86] Replace LEAs with INC/DEC when profitable

If possible and profitable, replace lea %reg, 1(%reg) and lea %reg, -1(%reg) with inc %reg and dec %reg respectively.

Patch by: anton.nadolsky@intel.com
Differential Revision: http://reviews.llvm.org/D14059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252722 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FixupLEAs.cpp
test/CodeGen/X86/fixup-lea.ll [new file with mode: 0644]
test/CodeGen/X86/lsr-static-addr.ll