[PATCH] D19198: [X86][AVX] Generalized matching for target shuffle combines

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 05:53:53 PDT 2016


RKSimon updated this revision to Diff 56697.
RKSimon added a comment.

Elena - I've added a test demonstrating the MOVDDUP combine affecting a masked v16f32 shuffle. As you said this causes the shuffle and the mask move to be split apart. When is this beneficial? Is there a minimum combine depth that you think we should include for combines of EVEX shuffles where the number of vector elements changes? I can add such a depth check if you think it worthwhile.

Regarding the UNPACK cases, just adding support for integer domain combines at this stage will cause some existing PSHUFD unary permutes to be replaced with un-foldable UNPACKs with repeated inputs.

As I said previously this patch is about splitting the matching of shuffles from the combines themselves to reduce code duplication with shuffle lowering. Although I have added 256/512 bit shuffle support for some existing shuffles I intended to add support for new shuffles later on - PSHUFD/VPERMILPS permutes are one of the first cases that will be added (along with BROADCAST).

If you prefer I can change the order of this work - reduce this patch to just pulling out the existing shuffle matching code, then future patches will deal with support matching permute (and broadcast / insertps / etc.) and 256/512 bit vectors?


Repository:
  rL LLVM

http://reviews.llvm.org/D19198

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/vector-shuffle-combining-avx.ll
  test/CodeGen/X86/vector-shuffle-combining-avx512bw.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19198.56697.patch
Type: text/x-patch
Size: 18013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160510/59a18d79/attachment.bin>


More information about the llvm-commits mailing list