JITDUMP(" *** Missing field sequence info for Dst/LHS of COPYBLK\n");
isNewUniq = true;
}
- else if (lhsFldSeq != nullptr && isEntire)
- {
- // This can occur for structs with one field, itself of a struct type.
- // We are assigning the one field and it is also the entire enclosing struct.
- //
- // Use an unique value number for the old map, as this is an an entire assignment
- // and we won't have any other values in the map
- ValueNumPair oldMap;
- oldMap.SetBoth(vnStore->VNForExpr(compCurBB, lclVarTree->TypeGet()));
- rhsVNPair = vnStore->VNPairApplySelectorsAssign(oldMap, lhsFldSeq, rhsVNPair, lclVarTree->TypeGet(),
- compCurBB);
- }
- else if (!isNewUniq)
- {
- ValueNumPair oldLhsVNPair = lvaTable[lhsLclNum].GetPerSsaData(lclVarTree->GetSsaNum())->m_vnPair;
- rhsVNPair = vnStore->VNPairApplySelectorsAssign(oldLhsVNPair, lhsFldSeq, rhsVNPair,
- lclVarTree->TypeGet(), compCurBB);
- }
if (isNewUniq)
{
rhsVNPair.SetBoth(vnStore->VNForExpr(compCurBB, lclVarTree->TypeGet()));
}
+ else // We will assign rhsVNPair into a map[lhsFldSeq]
+ {
+ if (lhsFldSeq != nullptr && isEntire)
+ {
+ // This can occur for structs with one field, itself of a struct type.
+ // We are assigning the one field and it is also the entire enclosing struct.
+ //
+ // Use an unique value number for the old map, as this is an an entire assignment
+ // and we won't have any other values in the map
+ ValueNumPair uniqueMap;
+ uniqueMap.SetBoth(vnStore->VNForExpr(compCurBB, lclVarTree->TypeGet()));
+ rhsVNPair = vnStore->VNPairApplySelectorsAssign(uniqueMap, lhsFldSeq, rhsVNPair,
+ lclVarTree->TypeGet(), compCurBB);
+ }
+ else
+ {
+ ValueNumPair oldLhsVNPair =
+ lvaTable[lhsLclNum].GetPerSsaData(lclVarTree->GetSsaNum())->m_vnPair;
+ rhsVNPair = vnStore->VNPairApplySelectorsAssign(oldLhsVNPair, lhsFldSeq, rhsVNPair,
+ lclVarTree->TypeGet(), compCurBB);
+ }
+ }
lvaTable[lhsLclNum].GetPerSsaData(lclDefSsaNum)->m_vnPair = vnStore->VNPNormalPair(rhsVNPair);
switch (oper)
{
case GT_LCL_VAR:
- case GT_REG_VAR:
{
GenTreeLclVarCommon* lcl = tree->AsLclVarCommon();
unsigned lclNum = lcl->gtLclNum;
switch (lhs->OperGet())
{
case GT_LCL_VAR:
- case GT_REG_VAR:
{
GenTreeLclVarCommon* lcl = lhs->AsLclVarCommon();
unsigned lclDefSsaNum = GetSsaNumForLocalVarDef(lcl);