[PATCH] D140048: [RISCV][InsertVSETVLI] Mutate prior vsetvli AVL if doing so allows us to remove a toggle

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 13:01:38 PST 2022


reames created this revision.
reames added reviewers: craig.topper, asb, frasercrmck, kito-cheng.
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, 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.

This extends the backwards walk to allow mutating the previous vsetvl's AVL value if it was not used by any instructions in between.  In practice, this mostly benefits vmv.x.s and fvmv.f.s patterns since vector instructions which ignore VL are rare.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140048

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vector-shuffle-reverse.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-masked-gather.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int.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: D140048.482967.patch
Type: text/x-patch
Size: 15679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/10c6adf0/attachment.bin>


More information about the llvm-commits mailing list