[llvm-branch-commits] [llvm] CodeGen: Check liveness before PHI sources when splitting a critical edge (PR #230375)

Nikita Popov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 9 00:12:15 PDT 2026


================
@@ -1332,11 +1332,11 @@ MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ,
     MachineRegisterInfo *MRI = &getParent()->getRegInfo();
     for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
       Register Reg = Register::index2VirtReg(i);
-      if (PHISrcRegs.count(Reg) || !LIS->hasInterval(Reg))
----------------
nikic wrote:

Why can't we iterate over PHISrcRegs in the first place here (possibly after stabilizing it)?

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


More information about the llvm-branch-commits mailing list