assert(fieldVarDsc->TypeGet() == TYP_FLOAT);
GetEmitter()->emitIns_R_R_I(INS_dup, emitTypeSize(TYP_FLOAT), varReg, operandReg, i);
}
+ genProduceReg(lclNode);
}
else
{
assert(currentRefPosition->refType == RefTypeExpUse);
}
}
- else if (spillAfter && !RefTypeIsUse(currentRefPosition->refType))
+ else if (spillAfter && !RefTypeIsUse(currentRefPosition->refType) &&
+ (!treeNode->IsMultiReg() || treeNode->gtGetOp1()->IsMultiRegNode()))
{
// In the case of a pure def, don't bother spilling - just assign it to the
// stack. However, we need to remember that it was spilled.
+ // We can't do this in the case of a multi-reg node with a non-multireg source as
+ // we need the register to extract into.
assert(interval->isSpilled);
varDsc->SetRegNum(REG_STK);
compiler->codeGen->genUpdateVarReg(fldVarDsc, tree, i);
}
compiler->codeGen->genUpdateRegLife(fldVarDsc, isBorn, isFieldDying DEBUGARG(tree));
+ // If this was marked for spill, genProduceReg should already have spilled it.
+ assert(!spill);
}
}
+ spill = false;
}
else if (varDsc->lvPromoted)
{