[PATCH] D37947: [X86] Fix two more places to prefer VPERMQ/PD over VPERM2X128 when AVX2 is enabled

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 16 10:46:15 PDT 2017


craig.topper created this revision.

The shuffle combining and lowerVectorShuffleAsLanePermuteAndBlend were both still trying to use VPERM2XF128 for unary shuffles when AVX2 is enabled. VPERM2X128 takes two inputs meaning when we use it for a unary shuffle one of those inputs is left undefined creating a false dependency on whatever register gets allocated there.

If we have VPERMQ/PD we should prefer those since they only have a single input.


https://reviews.llvm.org/D37947

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx-vperm2x128.ll
  test/CodeGen/X86/avx2-intrinsics-x86-upgrade.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/vector-shuffle-256-v16.ll
  test/CodeGen/X86/vector-shuffle-256-v32.ll
  test/CodeGen/X86/vector-shuffle-256-v8.ll
  test/CodeGen/X86/vector-shuffle-512-v32.ll
  test/CodeGen/X86/vector-shuffle-512-v64.ll
  test/CodeGen/X86/vector-shuffle-512-v8.ll
  test/CodeGen/X86/vector-shuffle-combining-avx.ll
  test/CodeGen/X86/vector-shuffle-combining-avx2.ll
  test/CodeGen/X86/vector-shuffle-combining.ll
  test/CodeGen/X86/vector-shuffle-v1.ll
  test/CodeGen/X86/vector-shuffle-v48.ll
  test/CodeGen/X86/x86-interleaved-access.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37947.115542.patch
Type: text/x-patch
Size: 118567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170916/b9e55fa7/attachment-0001.bin>


More information about the llvm-commits mailing list