if (availablePhysRegInterval != nullptr)
{
- intervalToUnassign = availablePhysRegInterval->assignedInterval;
if (isAssigned(availablePhysRegInterval ARM_ARG(currentInterval->registerType)))
{
unassignPhysReg(availablePhysRegInterval ARM_ARG(currentInterval->registerType));
- if (bestScore & VALUE_AVAILABLE)
+ intervalToUnassign = availablePhysRegInterval->assignedInterval;
+
+ if ((bestScore & VALUE_AVAILABLE) != 0 && intervalToUnassign != nullptr)
{
assert(intervalToUnassign->isConstant);
refPosition->treeNode->SetReuseRegVal();
regNumber thisRegNum = regRec->regNum;
#ifdef _TARGET_ARM_
- regNumber nextRegNum = REG_NA;
- RegRecord* nextRegRec = nullptr;
+ RegRecord* anotherRegRec = nullptr;
// Prepare second half RegRecord of a double register for TYP_DOUBLE
if (assignedInterval->registerType == TYP_DOUBLE)
{
assert(isFloatRegType(regRec->registerType));
- assert(genIsValidDoubleReg(regRec->regNum));
- nextRegNum = REG_NEXT(regRec->regNum);
- nextRegRec = getRegisterRecord(nextRegNum);
+ anotherRegRec = findAnotherHalfRegRec(regRec);
// Both two RegRecords should have been assigned to the same interval.
- assert(assignedInterval == nextRegRec->assignedInterval);
+ assert(assignedInterval == anotherRegRec->assignedInterval);
}
#endif // _TARGET_ARM_
{
// Both two RegRecords should have been unassigned together.
assert(regRec->assignedInterval == nullptr);
- assert(nextRegRec->assignedInterval == nullptr);
+ assert(anotherRegRec->assignedInterval == nullptr);
}
#endif // _TARGET_ARM_
// Update overlapping floating point register for TYP_DOUBLE
if (regType == TYP_DOUBLE)
{
- assert(genIsValidDoubleReg(reg->regNum));
-
RegRecord* anotherHalfReg = findAnotherHalfRegRec(reg);
anotherHalfReg->assignedInterval = interval;
// Update overlapping floating point register for TYP_DOUBLE
if (regType == TYP_DOUBLE)
{
- assert(genIsValidDoubleReg(reg->regNum));
-
RegRecord* anotherHalfReg = findAnotherHalfRegRec(reg);
anotherHalfReg->previousInterval = interval;