[PATCH] D95979: [RISCV] Split vrgather intrinsics into separate vrgather.vv and vrgather.vx intrinsics.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 14:39:14 PST 2021


craig.topper created this revision.
craig.topper added reviewers: evandro, HsiangKai, frasercrmck, khchen.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, 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.

The vrgather.vv instruction uses a vector of indices with the same
SEW as operand 0. The vrgather.vx instructions use a scalar index
operand of XLen bits.

By splitting this into 2 intrinsics we are able to use LLVMatchType
in the definition to avoid specifying the type for the index operand
when creating the IR for the intrinsic. For .vv it will match the
operand 0 type. And for .vx it will match the type of the vl operand
we already needed to specify a type for.

I'm considering splitting more intrinsics. This was a somewhat
odd one because the .vx doesn't use the element type, it always
use XLen.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95979

Files:
  llvm/include/llvm/IR/IntrinsicsRISCV.td
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
  llvm/test/CodeGen/RISCV/rvv/vrgather-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vrgather-rv64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95979.321237.patch
Type: text/x-patch
Size: 207409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/858c1b6f/attachment-0001.bin>


More information about the llvm-commits mailing list