[PATCH] D14901: [X86][SSE] Improve i16 splatting shuffles

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 21 06:53:31 PST 2015


RKSimon created this revision.
RKSimon added a reviewer: chandlerc.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

Better handling of the annoying pshuflw/pshufhw ops which only shuffle lower/upper halves of a vector.
 
Added vXi16 unary shuffle support for cases where i16 elements (from the same half of the source) are being splatted to the whole of one of the halves. This avoids the general lowering case which must shuffle the 32-bit elements first - meaning that we used to end up with unnecessary duplicate pshuflw/pshufhw shuffles.

Note this has the side effect of a lot of SSSE3 test cases no longer needing to use PSHUFB, as it falls below the 3 op combine threshold for when PSHUFB is typically worth it.

Repository:
  rL LLVM

http://reviews.llvm.org/D14901

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx-splat.ll
  test/CodeGen/X86/psubus.ll
  test/CodeGen/X86/vector-shift-ashr-128.ll
  test/CodeGen/X86/vector-shift-lshr-128.ll
  test/CodeGen/X86/vector-shift-shl-128.ll
  test/CodeGen/X86/vector-shuffle-128-v16.ll
  test/CodeGen/X86/vector-shuffle-128-v8.ll
  test/CodeGen/X86/vector-shuffle-256-v16.ll
  test/CodeGen/X86/vector-shuffle-256-v32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14901.40868.patch
Type: text/x-patch
Size: 51631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151121/12899036/attachment.bin>


More information about the llvm-commits mailing list