[PATCH] D55494: [x86] allow 8-bit adds to be promoted by convertToThreeAddress() to form LEA

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 9 07:14:45 PST 2018


spatel created this revision.
spatel added reviewers: craig.topper, RKSimon, andreadb.
Herald added subscribers: javed.absar, mcrosier.

This extends the code that handles 16-bit add promotion to form LEA to also allow 8-bit adds. That allows us to combine add ops with register moves and save some instructions. This is another step towards allowing add truncation in generic DAGCombiner (see D54640 <https://reviews.llvm.org/D54640>).


https://reviews.llvm.org/D55494

Files:
  lib/Target/X86/X86InstrArithmetic.td
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h
  test/CodeGen/X86/GlobalISel/add-scalar.ll
  test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll
  test/CodeGen/X86/GlobalISel/shl-scalar.ll
  test/CodeGen/X86/fixup-bw-copy.ll
  test/CodeGen/X86/fshr.ll
  test/CodeGen/X86/iabs.ll
  test/CodeGen/X86/mul-constant-i8.ll
  test/CodeGen/X86/popcnt.ll
  test/CodeGen/X86/pr23664.ll
  test/CodeGen/X86/rotate4.ll
  test/CodeGen/X86/scheduler-backtracking.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55494.177424.patch
Type: text/x-patch
Size: 15991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181209/50c95a1b/attachment.bin>


More information about the llvm-commits mailing list