[PATCH] D14261: [X86][SSE] Recursive search for zeroable shuffle elements

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 15:02:29 PST 2015


RKSimon created this revision.
RKSimon added reviewers: chandlerc, qcolombet, andreadb, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

Currently the zeroability of each lane of a shuffle is just based on its direct input arguments, missing many 'hidden' zeroable elements further up the DAG.

This patch recurses through SHUFFLE_VECTOR ops to determine if each lane is zeroable (a BUILD_VECTOR containing an UNDEF or a zero constant). It also adds support for peering through bitcasts to inputs of different vector types to determine if the constituent elements are all zeroable.

It would be straightforward to peer through other ops (X86 target shuffles being a good candidate), I hope to add these in the future as example test cases arise.

This is part of several upcoming patches to improve the lowering of (V)INSERTPS shuffles.


Repository:
  rL LLVM

http://reviews.llvm.org/D14261

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/sse41.ll
  test/CodeGen/X86/widen_load-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14261.38992.patch
Type: text/x-patch
Size: 6593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/23771e22/attachment.bin>


More information about the llvm-commits mailing list