[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 llvm-svn: 252722
Showing
- llvm/lib/Target/X86/X86FixupLEAs.cpp 79 additions, 8 deletionsllvm/lib/Target/X86/X86FixupLEAs.cpp
- llvm/test/CodeGen/X86/fixup-lea.ll 34 additions, 0 deletionsllvm/test/CodeGen/X86/fixup-lea.ll
- llvm/test/CodeGen/X86/lsr-static-addr.ll 1 addition, 1 deletionllvm/test/CodeGen/X86/lsr-static-addr.ll
Loading
Please register or sign in to comment