[PATCH] D150471: [RISCVGatherScatterLowering] Support shift in non-recursive matching

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 11:46:36 PDT 2023


reames created this revision.
reames added a reviewer: craig.topper.
Herald added subscribers: luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, asb, 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.

We can apply the same logic as for multiply since a left shift is just a multiply by a power of two.  Note that since shl is not commutative, we do need to be careful to match sure that the splat is the RHS of the instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150471

Files:
  llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/strided-load-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150471.521745.patch
Type: text/x-patch
Size: 8188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230512/879c6fbf/attachment.bin>


More information about the llvm-commits mailing list