Index: llvm/lib/CodeGen/RegisterScavenging.cpp =================================================================== --- llvm/lib/CodeGen/RegisterScavenging.cpp +++ llvm/lib/CodeGen/RegisterScavenging.cpp @@ -119,7 +119,7 @@ DefRegUnits.reset(); for (const MachineOperand &MO : MI.operands()) { if (MO.isRegMask()) { - TmpRegUnits.clear(); + TmpRegUnits.reset(); for (unsigned RU = 0, RUEnd = TRI->getNumRegUnits(); RU != RUEnd; ++RU) { for (MCRegUnitRootIterator RURI(RU, TRI); RURI.isValid(); ++RURI) { if (MO.clobbersPhysReg(*RURI)) {