[PATCH] D109405: [RISCV] Add an GPR def to the Zvlseg SPILL/RELOAD pseudos

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 17:23:14 PDT 2021


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

The expansion of these pseudos creates ADD instructions. Those
ADDs modify a GPR so that it is no longer contains the same value
as the input base pointer. Therefore, I believe we should have a
GPR as a Def on these instructions and expansion should get the
destination register for the ADDs from that operand.

At least in our tests here this works out so that register
scavenging picks the same register as the base pointer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109405

Files:
  llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
  llvm/test/CodeGen/RISCV/rvv/zvlsseg-spill.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109405.371222.patch
Type: text/x-patch
Size: 6752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210908/3a02ef91/attachment.bin>


More information about the llvm-commits mailing list