[PATCH] D58475: [X86] Improve detection of unneeded shift amount masking to also handle the case that the LHS has known zeroes in it

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 13:40:37 PST 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added a subscriber: jdoerfert.

If the LHS has known zeros, the RHS immediate will have had bits removed. So call computeKnownBits to get the known zeroes so we can handle this case.


https://reviews.llvm.org/D58475

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86InstrCompiler.td
  test/CodeGen/X86/btc_bts_btr.ll
  test/CodeGen/X86/rotate4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58475.187668.patch
Type: text/x-patch
Size: 16333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190220/df2a7a79/attachment.bin>


More information about the llvm-commits mailing list