[PATCH] D38318: [X86][SSE] Match PSHUFLW/PSHUFHW + PSHUFD vXi16 shuffle patterns (PR34686)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 08:43:29 PDT 2017


RKSimon created this revision.

As noted in PR34686, we are relying on a PSHUFD+PSHUFLW+PSHUFHW shuffle chain for most general vXi16 unary shuffles.

This patch checks for simpler PSHUFLW+PSHUFD and PSHUFHW+PSHUFD cases beforehand, building on some existing code that just handled splat shuffles.

By doing so we also prevent premature use of PSHUFB shuffles which can be slower and require the creation/loading of constant shuffle masks.


Repository:
  rL LLVM

https://reviews.llvm.org/D38318

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx-splat.ll
  test/CodeGen/X86/avx512-shuffles/partial_permute.ll
  test/CodeGen/X86/bitcast-int-to-vector-bool-sext.ll
  test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll
  test/CodeGen/X86/bitcast-int-to-vector-bool.ll
  test/CodeGen/X86/cast-vsel.ll
  test/CodeGen/X86/memset-nonzero.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/psubus.ll
  test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
  test/CodeGen/X86/vec_set-H.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
  test/CodeGen/X86/widened-broadcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38318.116822.patch
Type: text/x-patch
Size: 112416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170927/c90dd484/attachment.bin>


More information about the llvm-commits mailing list