diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index eae4cccb549..3c166bac4b4 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -165,7 +165,7 @@ bool RAGreedy::reassignVReg(LiveInterval &InterferingVReg, E = TRC->allocation_order_end(*MF); I != E; ++I) { unsigned PhysReg = *I; - if (PhysReg == OldPhysReg) + if (PhysReg == OldPhysReg || ReservedRegs.test(PhysReg)) continue; // Instantiate a "subquery", not to be confused with the Queries array.