@@ -1596,11 +1596,10 @@ void LinearScan::buildUpperVectorSaveRefPositions(GenTree* tree, LsraLocation cu
1596
1596
// If null, the restore will be inserted at the end of the block.
1597
1597
// isUse - If the refPosition that is about to be created represents a use or not.
1598
1598
// - If not, it would be the one at the end of the block.
1599
+ // multiRegIdx - Register position if this restore corresponds to a field of a multi reg node.
1599
1600
//
1600
- void LinearScan::buildUpperVectorRestoreRefPosition (Interval* lclVarInterval,
1601
- LsraLocation currentLoc,
1602
- GenTree* node,
1603
- bool isUse)
1601
+ void LinearScan::buildUpperVectorRestoreRefPosition (
1602
+ Interval* lclVarInterval, LsraLocation currentLoc, GenTree* node, bool isUse, unsigned multiRegIdx)
1604
1603
{
1605
1604
if (lclVarInterval->isPartiallySpilled )
1606
1605
{
@@ -1611,6 +1610,8 @@ void LinearScan::buildUpperVectorRestoreRefPosition(Interval* lclVarInterval,
1611
1610
newRefPosition (upperVectorInterval, currentLoc, RefTypeUpperVectorRestore, node, RBM_NONE);
1612
1611
lclVarInterval->isPartiallySpilled = false ;
1613
1612
1613
+ restorePos->setMultiRegIdx (multiRegIdx);
1614
+
1614
1615
if (isUse)
1615
1616
{
1616
1617
// If there was a use of the restore before end of the block restore,
@@ -2536,7 +2537,7 @@ void LinearScan::buildIntervals()
2536
2537
while (largeVectorVarsIter.NextElem (&largeVectorVarIndex))
2537
2538
{
2538
2539
Interval* lclVarInterval = getIntervalForLocalVar (largeVectorVarIndex);
2539
- buildUpperVectorRestoreRefPosition (lclVarInterval, currentLoc, nullptr , false );
2540
+ buildUpperVectorRestoreRefPosition (lclVarInterval, currentLoc, nullptr , false , 0 );
2540
2541
}
2541
2542
#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE
2542
2543
@@ -3195,7 +3196,7 @@ RefPosition* LinearScan::BuildUse(GenTree* operand, regMaskTP candidates, int mu
3195
3196
UpdatePreferencesOfDyingLocal (interval);
3196
3197
}
3197
3198
#if FEATURE_PARTIAL_SIMD_CALLEE_SAVE
3198
- buildUpperVectorRestoreRefPosition (interval, currentLoc, operand, true );
3199
+ buildUpperVectorRestoreRefPosition (interval, currentLoc, operand, true , ( unsigned )multiRegIdx );
3199
3200
#endif
3200
3201
}
3201
3202
else if (operand->IsMultiRegLclVar ())
@@ -3209,7 +3210,7 @@ RefPosition* LinearScan::BuildUse(GenTree* operand, regMaskTP candidates, int mu
3209
3210
VarSetOps::RemoveElemD (compiler, currentLiveVars, fieldVarDsc->lvVarIndex );
3210
3211
}
3211
3212
#if FEATURE_PARTIAL_SIMD_CALLEE_SAVE
3212
- buildUpperVectorRestoreRefPosition (interval, currentLoc, operand, true );
3213
+ buildUpperVectorRestoreRefPosition (interval, currentLoc, operand, true , ( unsigned )multiRegIdx );
3213
3214
#endif
3214
3215
}
3215
3216
else
0 commit comments