[PATCH] D157299: [RISCV] Use vmv.s.x for a constant build_vector when the entire size is less than 32 bits

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 10:19:56 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, asb, frasercrmck, luke, kito-cheng.
Herald added subscribers: jobnoorman, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

We have a variant of this for splats already, but hadn't handled the case where a single copy of the wider element can be inserted producing the entire required bit pattern.  This shows up mostly in very small vector shuffle tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157299

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-interleave.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157299.547841.patch
Type: text/x-patch
Size: 12146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230807/4fcd0314/attachment.bin>


More information about the llvm-commits mailing list