[PATCH] D126338: [RISCV] Hoist VSETVLI out of some scalable loops

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 15:42:33 PDT 2022


reames created this revision.
reames added reviewers: craig.topper, frasercrmck, kito-cheng.
Herald added subscribers: sunshaoce, VincentWu, luke957, 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, asb, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This is a straight forward extension of the PRE transform introduced in D124869 <https://reviews.llvm.org/D124869> to handle the VLMAX case.

The test changes here look quite positive.  This surprised me until I realized that all the tests are using @llvm.vscale to figure out the VLMAX, not the llvm.riscv.vsetvlmax intrinsic.  If they'd used the later, these would have been full redundancy cases and fully handled by the data flow.  I'm not really sure if use of vscale here is representative or not.  If it is, we should probably look at using VSETVLI to lower vscale rather than a raw read of vlenb and some math.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126338

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126338.431817.patch
Type: text/x-patch
Size: 24062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220524/0139aa38/attachment.bin>


More information about the llvm-commits mailing list