[PATCH] D16683: [X86][SSE] Resolve target shuffle inputs to sentinels to permit more combines

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 05:52:19 PST 2016


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

The combineX86ShufflesRecursively only supports unary shuffles, but was missing the opportunity to combine binary shuffles with a zero / undef second input.

This patch resolves target shuffle inputs, converting the shuffle mask elements to SM_SentinelUndef/SM_SentinelZero where possible. It then resolves the updated mask to check if we have created a faux unary shuffle.

Additionally, we now attempt to recursively call combineX86ShufflesRecursively for all input operands (we used to just recurse for unary integer shuffles and unary unpacks) - it safely returns early if its not a target shuffle.

Repository:
  rL LLVM

http://reviews.llvm.org/D16683

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/pshufb-mask-comments.ll
  test/CodeGen/X86/vector-sext.ll
  test/CodeGen/X86/vector-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16683.46263.patch
Type: text/x-patch
Size: 10961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160128/41153e17/attachment.bin>


More information about the llvm-commits mailing list