[RISCV] Make use of SHXADD instructions in RVV spill/reload code.
authorCraig Topper <craig.topper@sifive.com>
Wed, 4 May 2022 02:29:33 +0000 (19:29 -0700)
committerCraig Topper <craig.topper@sifive.com>
Wed, 4 May 2022 02:35:21 +0000 (19:35 -0700)
commit9cce9a126cca662316e650f9111fc715dc3e0351
tree8ff48e0fd71b0618c4bce99d4353da34dc5e1e3c
parent097181974067ff9372faccfd419a51f9ba662443
[RISCV] Make use of SHXADD instructions in RVV spill/reload code.

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.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D124824
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/test/CodeGen/RISCV/rvv/allocate-lmul-2-4-8.ll