[PATCH] D152496: [RISCV] Use vslidedown.vi vN, vN, 0 instead of vslideup.vi vN, vM, 0 for scalable vectors.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 22:25:23 PDT 2023


craig.topper created this revision.
craig.topper added reviewers: reames, luke.
Herald added subscribers: jobnoorman, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, 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, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

These instructions are semantically identical in the case where the
offset is 0 with the exception that vslideup has a vector overlap
constraint and vslidedown doesn't. As a result, we can prefer the one
without register overlap constraints to improve register allocation
flexibility.

This the scalable vector version of https://reviews.llvm.org/D152298.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152496

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/extract-subvector.ll
  llvm/test/CodeGen/RISCV/rvv/insert-subvector.ll
  llvm/test/CodeGen/RISCV/rvv/vreductions-fp-sdnode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152496.529827.patch
Type: text/x-patch
Size: 6748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230609/63486cb3/attachment.bin>


More information about the llvm-commits mailing list