[X86] Tune LEA usage for Silvermont
authorAlexey Volkov <avolkov.intel@gmail.com>
Tue, 20 May 2014 08:55:50 +0000 (08:55 +0000)
committerAlexey Volkov <avolkov.intel@gmail.com>
Tue, 20 May 2014 08:55:50 +0000 (08:55 +0000)
commit0d0bab5168239afddcc6a4fbcc73b101b570f563
tree2b1c12e5abd648345f55aa87864a772354782836
parent6f242c93ec57db744194ae3052fa59db71716ffe
[X86] Tune LEA usage for Silvermont

According to Intel Software Optimization Manual on Silvermont in some cases LEA
is better to be replaced with ADD instructions:
"The rule of thumb for ADDs and LEAs is that it is justified to use LEA
with a valid index and/or displacement for non-destructive destination purposes
(especially useful for stack offset cases), or to use a SCALE.
Otherwise, ADD(s) are preferable."

Differential Revision: http://reviews.llvm.org/D3826

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209198 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86.td
lib/Target/X86/X86FixupLEAs.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
lib/Target/X86/X86TargetMachine.cpp