[PATCH] D129948: [RISCV] Fold stack reload into sext.w by using lw instead of ld.
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 17 13:17:01 PDT 2022
asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:650
+ MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) {
+ MachineMemOperand *MMO = MF.getMachineMemOperand(
+ MachinePointerInfo::getFixedStack(MF, FrameIndex),
----------------
craig.topper wrote:
> asb wrote:
> > I think you could ditch this and replace the .addMemOperand below with `.setMemRefs(MI.memoperands())`
> MI is the sext.w, it doesn’t have a memoperand and the load hasn’t been created yet.
Ah yes, of course it is. Sorry for the confusion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129948/new/
https://reviews.llvm.org/D129948
More information about the llvm-commits
mailing list