[PATCH] D124824: [RISCV] Make use of SHXADD instructions in RVV spill/reload code.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 23:32:37 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: khchen, arcbbb, kito-cheng, reames, frasercrmck, rogfer01.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

We can use SH1ADD, SH2ADD, SH3ADD to multipy by 3, 5, and 9 respectively.

We could extend this to 3, 5, or 9 multiplied by a power 2 by also
emitting a SLLI.

While there remove the code that looks up TII. We're already a
member of RISCV's TII.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124824

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  llvm/test/CodeGen/RISCV/rvv/allocate-lmul-2-4-8.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124824.426582.patch
Type: text/x-patch
Size: 13818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220503/35eb9df4/attachment.bin>


More information about the llvm-commits mailing list