[PATCH][X86] Refactor peepholes for masked shift amount into a multiclass

Adam Nemet anemet at apple.com
Mon Mar 3 17:02:56 PST 2014


The peephole (shift x, (and y, 31)) -> (shift x, y) is repeated for each
integer type and each shift variant.

To improve this a new multiclass is added that covers all integer types.  The
shift patterns are now instantiated from this.  I am planning to add new
instances for rotates as well.

No functional change intended:

  * test/CodeGen/X86/shift-and.ll provides coverage

  * Compared the expanded tablegen output and matched up the defs for these
    Pat<>s before and after

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-X86-Refactor-peepholes-for-masked-shift-amount-into-.patch
Type: application/octet-stream
Size: 4353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140303/36f1099b/attachment.obj>


More information about the llvm-commits mailing list