[PATCH] D41350: [DAGCombine] Improve ReduceLoadWidth for SRL

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 05:46:02 PST 2017


samparker created this revision.
samparker added reviewers: niravd, RKSimon.
Herald added a subscriber: javed.absar.

If the SRL node is only used by an AND, we may be able to set the ExtVT to the width of the mask, making the AND redundant. To support this, another check has been added in isLegalNarrowLoad which queries whether the load is valid.

I've had to change a couple of X86 codegen tests, but I really don't know if they're correct. @RKSimon, if you could check these that would be great.


https://reviews.llvm.org/D41350

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/ARM/shift-combine.ll
  test/CodeGen/X86/2009-06-05-VZextByteShort.ll
  test/CodeGen/X86/h-registers-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41350.127344.patch
Type: text/x-patch
Size: 4437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171218/7e7cab34/attachment.bin>


More information about the llvm-commits mailing list