[PATCH] D96468: [RISCV] Add support loads, stores, and splats of vXi1 fixed vectors.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 16:32:10 PST 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, evandro, HsiangKai, rogfer01, khchen, arcbbb.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

This refines how we determine which masks types are legal and adds
support for loads, stores, and all ones/zeros splats.

I left a fixme in store handling where I think we need to zero
extra bits if the type isn't a multiple of a byte. If I remember
right from X86 there was some case we could have a store of a
1, 2, or 4 bit mask and have a scalar zextload that then expected the
bits to be 0. Its tricky to zero the bits with RVV. We need to do
something like round VL up, zero a register, lower the VL back down,
then do a tail undisturbed move into the zero register. Another
option might be to generate a mask of 1/2/4 bits set with a VL of 8
and use that to mask off the bits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96468

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/lib/Target/RISCV/RISCVSubtarget.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-load-store.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96468.322859.patch
Type: text/x-patch
Size: 16279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210211/83a3a870/attachment.bin>


More information about the llvm-commits mailing list