[PATCH] D96681: [RISCV][LegalizeTypes] Try to expand BITREVERSE before promoting if the promoted BITREVERSE would expand anyway.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 14 19:42:14 PST 2021


craig.topper created this revision.
craig.topper added reviewers: asb, RKSimon, spatel, luismarques, frasercrmck.
Herald added subscribers: StephenFan, vkmr, evandro, 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, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

If we're going to end up expanding anyway, we should do it early
so we don't create extra operations to handle the bytes added by
promotion.

Simlilar was done for BSWAP previously.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96681

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/RISCV/rv32Zbp.ll
  llvm/test/CodeGen/RISCV/rv64Zbp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96681.323659.patch
Type: text/x-patch
Size: 26920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210215/c605c07d/attachment.bin>


More information about the llvm-commits mailing list