[PATCH] D121784: [VP] Add splitting for VP_STRIDED_STORE and VP_STRIDED_LOAD

Lorenzo Albano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 03:08:07 PDT 2022


loralb created this revision.
loralb added reviewers: frasercrmck, craig.topper, simoll, rogfer01.
Herald added subscribers: luke957, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
loralb requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, MaskRay.
Herald added a project: LLVM.

Following the comment's thread of D117235 <https://reviews.llvm.org/D117235>, I added checks for the widening + splitting case, which also causes a split with one of the resulting vectors to be empty. Due to the same issues described in that same thread, the `fixed-vectors-strided-store.ll` test is missing the widening + splitting case, while the same case in the `strided-vpload.ll` test requires to manually split the loaded vector.

Furthermore, a cast of the `Stride` operand is needed when doing the split, otherwise an illegal type may remain after splitting. In the particular case of RISC-V, this seems to trigger an early lowering that prevents recognising the all-ones mask.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121784

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-vpload.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-vpstore.ll
  llvm/test/CodeGen/RISCV/rvv/strided-vpload.ll
  llvm/test/CodeGen/RISCV/rvv/strided-vpstore.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121784.415754.patch
Type: text/x-patch
Size: 46370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/db516aa2/attachment.bin>


More information about the llvm-commits mailing list