[PATCH] D105875: [RISCV] Prevent use of t0(aka x5) as rs1 for jalr instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 00:04:43 PDT 2021


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

Some microarchitectures treat rs1=x1/x5 on jalr as a hint to pop
the return-address stack. We should avoid using x5 on jalr
instructions since we aren't using x5 as an alternate link register.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105875

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/lib/Target/RISCV/RISCVRegisterInfo.td
  llvm/test/CodeGen/RISCV/calls.ll
  llvm/test/CodeGen/RISCV/tail-calls.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105875.358178.patch
Type: text/x-patch
Size: 5849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210713/1cc28768/attachment.bin>


More information about the llvm-commits mailing list