diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 08aec54f02408..6b494a2ce006d 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -2710,9 +2710,6 @@ bool RAGreedy::hasVirtRegAlloc() { Register Reg = Register::index2VirtReg(I); if (MRI->reg_nodbg_empty(Reg)) continue; - const TargetRegisterClass *RC = MRI->getRegClass(Reg); - if (!RC) - continue; if (shouldAllocateRegister(Reg)) return true; }