We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a192f8 commit e4284b8Copy full SHA for e4284b8
src/coreclr/jit/morph.cpp
@@ -11376,8 +11376,9 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac)
11376
LclVarDsc* fieldVarDsc = lvaGetDesc(lclNumFld);
11377
11378
// Also make sure that the tree type matches the fieldVarType and that it's lvFldOffset
11379
- // is zero
11380
- if (fieldVarDsc->TypeGet() == typ && (fieldVarDsc->lvFldOffset == 0))
+ // is same as that of tree's offset.
+ if (fieldVarDsc->TypeGet() == typ &&
11381
+ (fieldVarDsc->lvFldOffset == temp->AsLclVarCommon()->GetLclOffs()))
11382
{
11383
// We can just use the existing promoted field LclNum
11384
temp->AsLclVarCommon()->SetLclNum(lclNumFld);
0 commit comments