Skip to content

Commit 2430618

Browse files
authored
Fix physical promotion scenario name and a couple of bugs (#85343)
This was renamed but I forgot to update these occurrences. The result is that runtime-jit-experimental is not actually running with physical promotion enabled. Also fix a couple of bugs that made it in in the meantime.
1 parent 0bd15cb commit 2430618

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

eng/pipelines/common/templates/runtimes/run-test-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ jobs:
583583
- jitpartialcompilation
584584
- jitpartialcompilation_pgo
585585
- jitobjectstackallocation
586-
- jitgeneralizedpromotion
587-
- jitgeneralizedpromotion_full
586+
- jitphysicalpromotion
587+
- jitphysicalpromotion_full
588588

589589
${{ if in(parameters.testGroup, 'jit-cfg') }}:
590590
scenarios:

src/coreclr/jit/promotion.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,12 +1099,11 @@ class ReplaceVisitor : public GenTreeVisitor<ReplaceVisitor>
10991099

11001100
if (srcDsc->lvPromoted)
11011101
{
1102-
unsigned fieldLcl = m_compiler->lvaGetFieldLocal(srcDsc, srcOffs);
1103-
LclVarDsc* fieldLclDsc = m_compiler->lvaGetDesc(fieldLcl);
1102+
unsigned fieldLcl = m_compiler->lvaGetFieldLocal(srcDsc, srcOffs);
11041103

1105-
if (fieldLclDsc->lvType == rep->AccessType)
1104+
if ((fieldLcl != BAD_VAR_NUM) && (m_compiler->lvaGetDesc(fieldLcl)->lvType == rep->AccessType))
11061105
{
1107-
srcFld = m_compiler->gtNewLclvNode(fieldLcl, fieldLclDsc->lvType);
1106+
srcFld = m_compiler->gtNewLclvNode(fieldLcl, rep->AccessType);
11081107
}
11091108
}
11101109

@@ -1300,6 +1299,11 @@ class ReplaceVisitor : public GenTreeVisitor<ReplaceVisitor>
13001299
// Overlap with last entry starting before offs.
13011300
firstIndex--;
13021301
}
1302+
else if (firstIndex >= replacements.size())
1303+
{
1304+
// Starts after last replacement ends.
1305+
return false;
1306+
}
13031307
}
13041308

13051309
const Replacement& first = replacements[firstIndex];

0 commit comments

Comments
 (0)