[PATCH] D94229: [RISCV] Implement vlseg intrinsics.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 04:48:02 PST 2021


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

For Zvlsseg, we need continuous vector registers for the values. We need
to define new register classes for the different combinations of (number
of fields and LMUL). For example,

when the number of fields(NF) = 3, LMUL = 2, the values will be assigned to
(V0M2, V2M2, V4M2), (V2M2, V4M2, V6M2), (V4M2, V6M2, V8M2), ...

We define the vlseg intrinsics with multiple outputs. There is no way to
describe the codegen patterns with multiple outputs in the tablegen files.
We do the codegen in RISCVISelDAGToDAG and use EXTRACT_SUBREG to extract
the values of output.

The multiple scalable vector values will be put into a struct. This
patch is depended on the support for scalable vector struct.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94229

Files:
  llvm/include/llvm/IR/IntrinsicsRISCV.td
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
  llvm/lib/Target/RISCV/RISCVMCInstLower.cpp
  llvm/lib/Target/RISCV/RISCVRegisterInfo.td
  llvm/test/CodeGen/RISCV/rvv/vlseg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94229.315102.patch
Type: text/x-patch
Size: 220838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210107/3fca2385/attachment-0001.bin>


More information about the llvm-commits mailing list