[llvm] [RISCV] Support postRA vsetvl insertion pass (PR #70549)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 20:54:30 PDT 2024
================
@@ -950,10 +1074,12 @@ void RISCVInsertVSETVLI::insertVSETVLI(MachineBasicBlock &MBB,
}
if (Info.hasAVLImm()) {
- BuildMI(MBB, InsertPt, DL, TII->get(RISCV::PseudoVSETIVLI))
- .addReg(RISCV::X0, RegState::Define | RegState::Dead)
- .addImm(Info.getAVLImm())
- .addImm(Info.encodeVTYPE());
+ auto NeedFixupMI =
+ BuildMI(MBB, InsertPt, DL, TII->get(RISCV::PseudoVSETIVLI))
+ .addReg(RISCV::X0, RegState::Define | RegState::Dead)
+ .addImm(Info.getAVLImm())
+ .addImm(Info.encodeVTYPE());
+ fixupModifyVRegLIAfterInsertMI(NeedFixupMI, LIS);
----------------
topperc wrote:
The instruction just inserted writes X0 and doesn't read any register. Do we need any fixup?
https://github.com/llvm/llvm-project/pull/70549
More information about the llvm-commits
mailing list