[PATCH] D48784: [X86] Prefer to form negate instructions instead of folding a load

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 11:35:14 PDT 2018


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

Previously when given (sub 0, load), we were prefering to fold the load and materializing the 0 in a register. I think we should instead use negate and do the load as a separate instruction.


https://reviews.llvm.org/D48784

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  test/CodeGen/X86/2008-09-11-CoalescerBug2.ll
  test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
  test/CodeGen/X86/add.ll
  test/CodeGen/X86/imul.ll
  test/CodeGen/X86/merge-consecutive-stores.ll
  test/CodeGen/X86/subcarry.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48784.153547.patch
Type: text/x-patch
Size: 5192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180629/a7850b16/attachment.bin>


More information about the llvm-commits mailing list