[PATCH] D137530: [RISCV] Splat scalar to be of length VL instead of 1 for reductions
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 6 23:34:21 PST 2022
pcwang-thead created this revision.
pcwang-thead added reviewers: reames, craig.topper, frasercrmck, jrtc27.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.
Correct me if I am wrong, I think there is minmal microarchitecture
difference between vmv.s.x with vl==1 and v(f)mv.v.(ixf) with
vl==avl. So we can just splat scalar to be of length VL instead
of 1 to reduce context switch of vtype.
Two concerns:
- For LMUL>1, there are more than 1 registers that will be written
back. Should we limit this to cases where LMUL<=1?
- For floating-point cases, there are some regressions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137530
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int.ll
llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-fp-sdnode.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-fp-vp.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-int-vp.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-int.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137530.473573.patch
Type: text/x-patch
Size: 508334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221107/40df64f0/attachment-0001.bin>
More information about the llvm-commits
mailing list