[PATCH] D46040: [X86] Form MUL_IMM for multiplies with 3/5/9 to block load folding.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 20:52:19 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

Previously we only formed MUL_IMM when we split a constant. This blocked load folding on those cases. We should also form MUL_IMM for 3/5/9 to favor LEA over load folding.


Repository:
  rL LLVM

https://reviews.llvm.org/D46040

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/imul.ll
  test/CodeGen/X86/mul-constant-i16.ll
  test/CodeGen/X86/mul-constant-i32.ll
  test/CodeGen/X86/mul-constant-i64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46040.143860.patch
Type: text/x-patch
Size: 5186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/6d0b1159/attachment-0001.bin>


More information about the llvm-commits mailing list