[PATCH] D66004: [WIP][X86][SSE] SimplifyDemandedVectorEltsForTargetNode - add general shuffle combining support

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 04:13:39 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, andreadb, lebedev.ri.
Herald added a project: LLVM.

This patch uses partial DemandedElts masks to further simplify target shuffle chains and finally starts making target shuffle combining part of SimplifyDemandedBits/SimplifyDemandedVectorElts.

We already manage this for Depth == 0 cases, where combineX86ShuffleChain would early-out if the shuffle combined to the same op, but the patch generalizes this by manipulating the depth handling of combineX86ShufflesRecursively - calling with a new Depth = 0 and reducing the maximum shuffle combine depth accordingly.

This is still WIP. There are a couple of regressions I'm still investigating, mainly when we should/shouldn't be using INSERTPS for BUILD_VECTOR patterns (PR27854).


Repository:
  rL LLVM

https://reviews.llvm.org/D66004

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avg.ll
  test/CodeGen/X86/avx-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx-trunc.ll
  test/CodeGen/X86/avx512-cvt.ll
  test/CodeGen/X86/bitcast-and-setcc-128.ll
  test/CodeGen/X86/bitcast-and-setcc-512.ll
  test/CodeGen/X86/bitcast-setcc-128.ll
  test/CodeGen/X86/bitcast-vector-bool.ll
  test/CodeGen/X86/build-vector-128.ll
  test/CodeGen/X86/build-vector-256.ll
  test/CodeGen/X86/build-vector-512.ll
  test/CodeGen/X86/buildvec-extract.ll
  test/CodeGen/X86/buildvec-insertvec.ll
  test/CodeGen/X86/combine-fcopysign.ll
  test/CodeGen/X86/combine-sdiv.ll
  test/CodeGen/X86/combine-shl.ll
  test/CodeGen/X86/combine-sra.ll
  test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
  test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
  test/CodeGen/X86/fma.ll
  test/CodeGen/X86/fold-load-vec.ll
  test/CodeGen/X86/haddsub-2.ll
  test/CodeGen/X86/haddsub-undef.ll
  test/CodeGen/X86/half.ll
  test/CodeGen/X86/insert-into-constant-vector.ll
  test/CodeGen/X86/known-signbits-vector.ll
  test/CodeGen/X86/load-slice.ll
  test/CodeGen/X86/masked_expandload.ll
  test/CodeGen/X86/masked_load.ll
  test/CodeGen/X86/masked_store_trunc.ll
  test/CodeGen/X86/merge-consecutive-loads-128.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/oddsubvector.ll
  test/CodeGen/X86/pmul.ll
  test/CodeGen/X86/pr29112.ll
  test/CodeGen/X86/pr30430.ll
  test/CodeGen/X86/psubus.ll
  test/CodeGen/X86/shrink_vmul.ll
  test/CodeGen/X86/shuffle-of-insert.ll
  test/CodeGen/X86/shuffle-strided-with-offset-128.ll
  test/CodeGen/X86/shuffle-strided-with-offset-512.ll
  test/CodeGen/X86/shuffle-vs-trunc-256.ll
  test/CodeGen/X86/shuffle-vs-trunc-512.ll
  test/CodeGen/X86/srem-seteq-vec-nonsplat.ll
  test/CodeGen/X86/sse-intrinsics-fast-isel.ll
  test/CodeGen/X86/sse2.ll
  test/CodeGen/X86/sse3-avx-addsub-2.ll
  test/CodeGen/X86/sse41.ll
  test/CodeGen/X86/test-shrink-bug.ll
  test/CodeGen/X86/trunc-subvector.ll
  test/CodeGen/X86/urem-seteq-vec-nonsplat.ll
  test/CodeGen/X86/vec-libcalls.ll
  test/CodeGen/X86/vec_insert-2.ll
  test/CodeGen/X86/vec_insert-3.ll
  test/CodeGen/X86/vec_insert-5.ll
  test/CodeGen/X86/vec_int_to_fp.ll
  test/CodeGen/X86/vec_smulo.ll
  test/CodeGen/X86/vec_umulo.ll
  test/CodeGen/X86/vector-half-conversions.ll
  test/CodeGen/X86/vector-idiv-udiv-256.ll
  test/CodeGen/X86/vector-reduce-and-bool.ll
  test/CodeGen/X86/vector-reduce-or-bool.ll
  test/CodeGen/X86/vector-reduce-xor-bool.ll
  test/CodeGen/X86/vector-shuffle-128-v16.ll
  test/CodeGen/X86/vector-shuffle-128-v4.ll
  test/CodeGen/X86/vector-shuffle-128-v8.ll
  test/CodeGen/X86/vector-shuffle-256-v16.ll
  test/CodeGen/X86/vector-shuffle-256-v8.ll
  test/CodeGen/X86/vector-shuffle-combining-ssse3.ll
  test/CodeGen/X86/vector-shuffle-combining.ll
  test/CodeGen/X86/vector-shuffle-variable-128.ll
  test/CodeGen/X86/vector-shuffle-variable-256.ll
  test/CodeGen/X86/vector-sqrt.ll
  test/CodeGen/X86/vector-trunc-math.ll
  test/CodeGen/X86/vector-trunc.ll
  test/CodeGen/X86/vector-zext.ll
  test/CodeGen/X86/vselect.ll
  test/CodeGen/X86/vshift-4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66004.214353.patch
Type: text/x-patch
Size: 473179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190809/c2ead7ab/attachment-0001.bin>


More information about the llvm-commits mailing list