[PATCH] D140408: [RISCV] Implement isMultiStoresCheaperThanBitsMerge hook

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 08:31:11 PST 2022


asb created this revision.
asb added reviewers: reames, craig.topper.
Herald added subscribers: wingo, sunshaoce, pmatos, VincentWu, StephenFan, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, pengfei, 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, arichardson.
Herald added a project: All.
asb requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Grabs the same logic and reasoning from the X86 implementation of the hook. The benefit is slightly less clear for when the soft float ABI is used (i.e. there's no transfer from an FPR to a GPR), but I've opted not to gate it based on ABI - feedback welcome.

I've got no reason to believe this is a particularly meaningful optimisation (i.e. I spotted the hook and figured the X86 logic applied to RISC-V rather than seeing this issue in real code), but it still seems marginally better for these test cases.


https://reviews.llvm.org/D140408

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/split-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140408.484285.patch
Type: text/x-patch
Size: 11181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221220/85a659fb/attachment.bin>


More information about the llvm-commits mailing list