[PATCH] D152298: [RISCV] Use vslidedown.vi vN, vN, 0 instead of vslideup.vi vN, vM, 0 for subvector insertion
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 11:59:56 PDT 2023
reames created this revision.
reames added reviewers: craig.topper, luke, asb, kito-cheng.
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, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: 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 patch is specific to subvector insertion, but this pattern may show up elsewhere. We could possibly rework this as a DAG combine if reviewers thought that was worthwhile.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152298
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-calling-conv.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extload-truncstore.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-setcc.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll
llvm/test/CodeGen/RISCV/rvv/shuffle-reverse.ll
llvm/test/CodeGen/RISCV/rvv/vector-interleave-fixed.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152298.528972.patch
Type: text/x-patch
Size: 29986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/0cc0ae68/attachment.bin>
More information about the llvm-commits
mailing list