[PATCH] D129402: [RISCV] Teach shouldConvertConstantLoadToIntImm that constant materialization can use constant pools.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 15:19:43 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: asb, luismarques, jrtc27, reames.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, kristof.beyls, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

I think it only makes sense to return true here if we aren't going
to turn around and create a constant pool for the immmediate.

I left out the check for useConstantPoolForLargeInts() thinking
that even if you don't want the commpiler to create a constant pool
you might still want to avoid materializing an integer that is
already available in a global variable.

Test file was copied from AArch64/ARM and has not been commited yet.
Will post separate review for that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129402

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/memcpy-inline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129402.443370.patch
Type: text/x-patch
Size: 8433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220708/1699f8cf/attachment.bin>


More information about the llvm-commits mailing list