[PATCH] D51337: [X86] Support v2i32 gather/scatter indices with -x86-experimental-vector-widening-legalization

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 17:02:48 PDT 2018


craig.topper updated this revision to Diff 162991.
craig.topper added a comment.
Herald added subscribers: atanasyan, jrtc27, nhaehnle, jvesely, sdardis.

Take Eli's suggestion and only widen the index. This fixes the scatter/gather index only widening cases to use the better instruction. The default 'promote' case is still promoting to a v2i64 index type since that's what type legalization will naturally do.

I've also added KNL and AVX2 command lines so we can see those too. On KNL we prefer to use the 512-bit gather/scatter with a vXi1 mask. For AVX2 we don't have scatter and the gather mask is a vector register.


Repository:
  rL LLVM

https://reviews.llvm.org/D51337

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/AMDGPU/copy-illegal-type.ll
  test/CodeGen/Mips/cconv/return-hard-fp128.ll
  test/CodeGen/Mips/cconv/return-hard-struct-f128.ll
  test/CodeGen/Mips/msa/bitcast.ll
  test/CodeGen/X86/masked_gather_scatter_widen.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51337.162991.patch
Type: text/x-patch
Size: 35334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/88036b5a/attachment.bin>


More information about the llvm-commits mailing list