[PATCH] D151823: [RISCV] Combine vmv.s.x (vslideup pt, v, 1, <all-ones>, vl), scalar, vl to vslide1up
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 11:23:35 PDT 2023
reames created this revision.
reames added reviewers: craig.topper, l.frisken, asb, frasercrmck.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, 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, 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.
This covers the case where we insert a scalar into lane 0 of a vector after performing the slideup. This was triggered by offline discussion about D151736 <https://reviews.llvm.org/D151736>, and is an alternative to that approach. I think this is cleaner and a potentially more general.
A couple things we have to be careful of:
- The type sizes need to match. We implicitly truncate the scalar, and the shift is in SEW units.
- We need to avoid VL=0 and a mask with lane-0 disabled. The former is just tricky to reason about, the later differs in behavior between the two forms.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151823
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vector-shuffle-vslide1up.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151823.527136.patch
Type: text/x-patch
Size: 6566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230531/34cce318/attachment-0001.bin>
More information about the llvm-commits
mailing list