[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
Sun Jul 17 09:36:11 PDT 2022
craig.topper added inline comments.
================
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),
----------------
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.
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