[llvm] [RISCV] Fix crash when trying to remove segment (PR #146524)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 06:34:37 PDT 2025
================
@@ -1768,8 +1768,9 @@ void RISCVInsertVSETVLI::insertReadVL(MachineBasicBlock &MBB) {
SlotIndex NewDefSI =
LIS->InsertMachineInstrInMaps(*ReadVLMI).getRegSlot();
LiveInterval &DefLI = LIS->getInterval(VLOutput);
- VNInfo *DefVNI = DefLI.getVNInfoAt(DefLI.beginIndex());
- DefLI.removeSegment(DefLI.beginIndex(), NewDefSI);
+ const auto *DefSeg = DefLI.getSegmentContaining(NewDefSI);
----------------
sc-clulzze wrote:
Addressed
https://github.com/llvm/llvm-project/pull/146524
More information about the llvm-commits
mailing list