[PATCH] D119303: [RISCV] Lower VECTOR_SPLICE to RVV instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 16:35:23 PST 2022


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, rogfer01, npanchen, ABataev, arcbbb.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This lowers VECTOR_SPLICE to a slidedown follow by a slideup.

I've used a tail agnostic slidedown and limited the VL to only the
elements that will not be overwritten by the slideup. The slideup
uses VLMax for its VL. It unfortunately uses tail undisturbed policy
but it isn't required as there is no tail. We just need the merge
operand to carry the bits for the lower portion of the result.

Care was taken to ensure that either the slideup or slidedown will
be able to use a .vi instruction when the immediate is small. Which
one uses the immediate depends on the sign of the immediate.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119303

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/rvv/vector-splice.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119303.407013.patch
Type: text/x-patch
Size: 94535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/6d7f4260/attachment.bin>


More information about the llvm-commits mailing list