File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -5316,11 +5316,12 @@ void Lowering::LowerFieldListToFieldListOfRegisters(GenTreeFieldList* fieldLis
5316
5316
if ((i == numRegs - 1 ) && varTypeUsesIntReg (regType))
5317
5317
{
5318
5318
GenTree* node = regEntry->GetNode ();
5319
- // If this is a cast that affects only bits after the return size
5320
- // then it can be removed. Those bits are undefined in all our ABIs
5321
- // for structs.
5322
- while (node->OperIs (GT_CAST) && !node->gtOverflow () && varTypeUsesIntReg (node->CastToType ()) &&
5323
- varTypeUsesIntReg (node->CastFromType ()) && (genTypeSize (regType) <= genTypeSize (node->CastToType ())))
5319
+ // If this is a truncation that affects only bits after the return
5320
+ // size then it can be removed. Those bits are undefined in all our
5321
+ // ABIs for structs.
5322
+ while (node->OperIs (GT_CAST) && !node->gtOverflow () && (genActualType (node->CastFromType ()) == TYP_INT) &&
5323
+ (genActualType (node->CastToType ()) == TYP_INT) &&
5324
+ (genTypeSize (regType) <= genTypeSize (node->CastToType ())))
5324
5325
{
5325
5326
GenTree* op = node->AsCast ()->CastOp ();
5326
5327
regEntry->SetNode (op);
You can’t perform that action at this time.
0 commit comments