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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 15:19:16 PDT 2018


efriedma added a comment.

Widening everything when the index needs to be widened is awkward.  It's not clear what's supposed to happen if widening the index to make it legal makes the value illegal.  The way it's implemented, you'll end up in an infinite loop of splitting and widening.  (Not sure the infinite loop can happen for legal gather/scatter operations on x86, but it could show up in other cases.)  And for test_scatter_v2i32_index, we don't generate the expected instruction in either mode; it should be `vscatterdpd %xmm0, (%rdi,%xmm1,8) {%k1}`.

Can we implement some rule that allows the index of an MGATHER to have more elements than the data, and the upper elements are ignored?  Sort of like an implicit SIGN_EXTEND_VECTOR_INREG.


Repository:
  rL LLVM

https://reviews.llvm.org/D51337





More information about the llvm-commits mailing list