[PATCH] D94073: [RISCV] Add vector integer mul/mulh/div/rem ISel patterns

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 02:29:23 PST 2021


frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, evandro, rogfer01, HsiangKai.
Herald added subscribers: NickHung, luismarques, apazos, sameer.abuasal, pzheng, steven.zhang, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

There is no test coverage for the mulhs or mulhu patterns as I can't get
the DAGCombiner to generate them for scalable vectors. There are a few
places in that still need updating for that to work. I left the patterns
in regardless as they are correct.

One caveat here is that urem on nxvXi64 vectors hits an assertion on
RV32 when SelectionDAG::getConstant needs to insert legal nodes but must
expand the i64 element type. This case cannot handle scalable vectors.

The nxvXi64 urem test cases are thus commented out for now while a fix
is thought of. The patterns are left in as they are not the ultimate
problem.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94073

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
  llvm/test/CodeGen/RISCV/rvv/vdiv-sdnode-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vdiv-sdnode-rv64.ll
  llvm/test/CodeGen/RISCV/rvv/vdivu-sdnode-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vdivu-sdnode-rv64.ll
  llvm/test/CodeGen/RISCV/rvv/vmul-sdnode-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vmul-sdnode-rv64.ll
  llvm/test/CodeGen/RISCV/rvv/vrem-sdnode-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vrem-sdnode-rv64.ll
  llvm/test/CodeGen/RISCV/rvv/vremu-sdnode-rv32.ll
  llvm/test/CodeGen/RISCV/rvv/vremu-sdnode-rv64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94073.314549.patch
Type: text/x-patch
Size: 313489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210105/6f29ec2e/attachment-0001.bin>


More information about the llvm-commits mailing list