[PATCH] D96186: [RISCV] Add support for selecting vrgather.vx/vi for fixed vector splat shuffles.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 15:14:53 PST 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, HsiangKai, evandro, khchen, rogfer01.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, pzheng, 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.

The test cases extract a fixed element from a vector and splat it
into a vector. This gets DAG combined into a splat shuffle.

I've used some very wide vectors in the test to make sure we have
at least a couple tests where the element doesn't fit into the
uimm5 immediate of vrgather.vi so we fall back to vrgather.vx.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96186

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-vrgather.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-vrgather.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96186.321888.patch
Type: text/x-patch
Size: 22091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210205/9e80978b/attachment.bin>


More information about the llvm-commits mailing list