[llvm] [RISCV] Shrink uses of coalesced vsetvlis (PR #98286)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 07:28:32 PDT 2024
================
@@ -1727,6 +1727,10 @@ void RISCVInsertVSETVLI::coalesceVSETVLIs(MachineBasicBlock &MBB) const {
if (LIS)
LIS->RemoveMachineInstrFromMaps(*MI);
MI->eraseFromParent();
+ if (LIS)
+ for (MachineOperand &MO : MI->uses())
----------------
preames wrote:
Calling MI->uses() after MI->eraseFromParent() is definitely unsafe.
https://github.com/llvm/llvm-project/pull/98286
More information about the llvm-commits
mailing list