[PATCH] D11289: [X86] Widen the 'AND' mask if doing so shrinks the encoding size

David Majnemer david.majnemer at gmail.com
Fri Jul 17 01:28:20 PDT 2015


majnemer created this revision.
majnemer added reviewers: chandlerc, echristo, escha, resistor, hfinkel.
majnemer added a subscriber: llvm-commits.

We can set additional bits in a mask given that we know the other
operand of an AND already has some bits set to zero.  This can be more
efficient if doing so allows us to use an instruction which implicitly
sign extends the immediate.

This fixes PR24085.

http://reviews.llvm.org/D11289

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  test/CodeGen/X86/shift-pair.ll
  test/CodeGen/X86/win64_frame.ll
  test/CodeGen/X86/zext-fold.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11289.29982.patch
Type: text/x-patch
Size: 4038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150717/49568458/attachment.bin>


More information about the llvm-commits mailing list