[PATCH] [X86] Tune LEA usage for Silvermont

Alexey Volkov avolkov.intel at gmail.com
Mon May 19 07:37:58 PDT 2014


Hi nadav,

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."

Attached patch replaces such LEAs with ADD instructions.

http://reviews.llvm.org/D3826

Files:
  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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3826.9571.patch
Type: text/x-patch
Size: 9488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140519/04d996bb/attachment.bin>


More information about the llvm-commits mailing list