[PATCH] D95322: [RISCV] Custom type legalize i8/i16 UDIV/UREM/SDIV on RV64 so we can use divuw/remuw/divw.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 24 16:16:12 PST 2021


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

This makes our i8/i16 codegen more similar to the i32 codegen.

I've also added computeKnownBits support for DIVUW/REMUW so
that we can remove zero extending ANDs from the output. Without
this we end up turning DIVUW/REMUW back into DIVU/REMU via some
isel patterns.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95322

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rv64m-exhaustive-w-insts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95322.318876.patch
Type: text/x-patch
Size: 6816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/32923b80/attachment.bin>


More information about the llvm-commits mailing list