[llvm] [RISCV] Move RISCVDeadRegisterDefinitions to post vector regalloc (PR #90636)

Piyou Chen via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 06:18:04 PDT 2024


================
@@ -89,8 +96,8 @@ bool RISCVDeadRegisterDefinitions::runOnMachineFunction(MachineFunction &MF) {
           LLVM_DEBUG(dbgs() << "    Ignoring, register is not a GPR.\n");
           continue;
         }
+        LIS.removeInterval(Reg);
----------------
BeMg wrote:

nit: maybe could add `if(LIS.hasInterval(Reg))` or `assert(LIS.hasInterval(Reg))` to make sure the VReg has intervals. 

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


More information about the llvm-commits mailing list