[PATCH] D129948: [RISCV] Fold stack reload into sext.w by using lw instead of ld.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 16 18:31:39 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: reames, asb, luismarques, frasercrmck, jrtc27.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, 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, 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.

We can use lw to load 4 bytes from the stack and sign extend them
instead of loading all 8 bytes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129948

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.h
  llvm/test/CodeGen/RISCV/stack-folding.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129948.445278.patch
Type: text/x-patch
Size: 5603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220717/2db40df6/attachment.bin>


More information about the llvm-commits mailing list