[llvm] [RISCV] Prune dead LI in vsetvli coalescing with trivially dead vsetvli (PR #98647)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 23:55:00 PDT 2024


================
@@ -1720,8 +1725,9 @@ void RISCVInsertVSETVLI::coalesceVSETVLIs(MachineBasicBlock &MBB) const {
     if (MI->getOperand(1).isReg())
       OldAVLReg = MI->getOperand(1).getReg();
     MI->eraseFromParent();
-    if (LIS && OldAVLReg && OldAVLReg.isVirtual())
-      LIS->shrinkToUses(&LIS->getInterval(OldAVLReg));
+    if (OldAVLReg && OldAVLReg.isVirtual())
+      afterDroppedAVLUse(OldAVLReg);
+
----------------
lukel97 wrote:

```suggestion
```

https://github.com/llvm/llvm-project/pull/98647


More information about the llvm-commits mailing list