[PATCH] D91457: [RISCV] Custom type legalize i32 bswap/bitreverse to GREVIW on RV64 with Zbp extension

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 13:07:44 PST 2020


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

Currently we require a sra to pattern match these properly in isel. If the consumer didn't need the result sign extended we'll have an srl instead of sra and fail to match.

This patch switches to custom legalizing to GREVIW using portions of D91259 <https://reviews.llvm.org/D91259>.


https://reviews.llvm.org/D91457

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoB.td
  llvm/test/CodeGen/RISCV/rv64Zbp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91457.305244.patch
Type: text/x-patch
Size: 6697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201113/fe035bd8/attachment.bin>


More information about the llvm-commits mailing list