[PATCH] D155698: [RISCV] Add more patterns for vnsr[a,l].wx

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 06:24:32 PDT 2023


luke created this revision.
luke added reviewers: craig.topper, reames, frasercrmck, kito-cheng, Jimerlife.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

We're currently only matching scalar shift amounts where the type is the same
as the vector element type. But because only the bottom log2(2*SEW) bits are
used, only 7 bits will be used at most so we can use any scalar type >= i8.

This patch adds patterns for the case above, as well as for when the shift
amount type is the same as the widened element type and doesn't need extended.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155698

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/test/CodeGen/RISCV/rvv/ctlz-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/cttz-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/vnsra-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/vnsrl-sdnode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155698.541990.patch
Type: text/x-patch
Size: 41888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/3e61a279/attachment-0001.bin>


More information about the llvm-commits mailing list