[PATCH] D157422: [RISCV][GlobalISel] Legalize division and remainder

Nitin John Raj via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 10:52:37 PDT 2023


nitinjohnraj created this revision.
nitinjohnraj added reviewers: craig.topper, arsenm.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, 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, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
nitinjohnraj requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay, wdng.
Herald added a project: LLVM.

Legalize division and remainder. We test for (s7, s8, s16, s32, s48, s64) on rv64 and (s8, s15, s16, s32, s64, s72, s128) on rv64, with and without the +m, +zmmul extensions. We do not handle types with size > 2 x XLen -- these ought to be handled in the IR pass.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157422

Files:
  llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-div.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-rem.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-div.mir
  llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-rem.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157422.548283.patch
Type: text/x-patch
Size: 154477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230808/0566ab5d/attachment.bin>


More information about the llvm-commits mailing list