File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12632,22 +12632,17 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
1263212632 // out-of-bounds w.r.t. the local).
1263312633 if ((temp != nullptr) && !foldAndReturnTemp)
1263412634 {
12635- assert(temp->OperIsLocal ());
12635+ assert(temp->OperIsLocalRead ());
1263612636
12637- const unsigned lclNum = temp->AsLclVarCommon()->GetLclNum();
12638- LclVarDsc* const varDsc = lvaGetDesc(lclNum);
12639-
12640- const var_types tempTyp = temp->TypeGet();
12641- const bool useExactSize = varTypeIsStruct(tempTyp) || (tempTyp == TYP_BLK) || (tempTyp == TYP_LCLBLK);
12642- const unsigned varSize = useExactSize ? varDsc->lvExactSize : genTypeSize(temp);
12637+ unsigned lclNum = temp->AsLclVarCommon()->GetLclNum();
1264312638
1264412639 // Make sure we do not enregister this lclVar.
1264512640 lvaSetVarDoNotEnregister(lclNum DEBUGARG(DoNotEnregisterReason::LocalField));
1264612641
1264712642 // If the size of the load is greater than the size of the lclVar, we cannot fold this access into
1264812643 // a lclFld: the access represented by an lclFld node must begin at or after the start of the
1264912644 // lclVar and must not extend beyond the end of the lclVar.
12650- if ((ival1 >= 0) && ((ival1 + genTypeSize(typ)) <= varSize ))
12645+ if ((ival1 >= 0) && ((ival1 + genTypeSize(typ)) <= lvaLclExactSize(lclNum) ))
1265112646 {
1265212647 GenTreeLclFld* lclFld;
1265312648
You can’t perform that action at this time.
0 commit comments