diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp index f1d31daaea530..5c8f060c09e5f 100644 --- a/llvm/lib/CodeGen/LivePhysRegs.cpp +++ b/llvm/lib/CodeGen/LivePhysRegs.cpp @@ -366,7 +366,7 @@ bool llvm::isPhysRegUsedAfter(Register Reg, MachineBasicBlock::iterator MBI) { // If we hit the end of the block, check whether Reg is live into a // successor. for (const auto &LO : MBB->liveouts()) - if (LO.PhysReg == MCRegister(Reg) && LO.LaneMask.any()) + if (LO.PhysReg == Reg.asMCReg() && LO.LaneMask.any()) return true; return false;