Skip to content

Commit

Permalink
Fix unitialized local in impCastClassOrIsInstToTree (dotnet#82348)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo authored Feb 20, 2023
1 parent e79694c commit ac7afb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5937,8 +5937,9 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
//

GenTree* op2Var = op2;
if (isCastClass && !partialExpand)
if (isCastClass && !partialExpand && (exactCls == NO_CLASS_HANDLE))
{
// if exactCls is not null we won't have to clone op2 (it will be used only for the fallback)
op2Var = fgInsertCommaFormTemp(&op2);
lvaTable[op2Var->AsLclVarCommon()->GetLclNum()].lvIsCSE = true;
}
Expand Down
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1324,9 +1324,6 @@
<ExcludeList Include="$(XunitTestBinBase)/JIT/opt/ValueNumbering/TypeTestFolding/*">
<Issue>https://github.com/dotnet/runtime/issues/71883</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/PGO/ProfileCastClassAndIsInst/**">
<Issue>https://github.com/dotnet/runtime/issues/82071</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/DevDiv_461649/DevDiv_461649/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: Reflection emit</Issue>
</ExcludeList>
Expand Down

0 comments on commit ac7afb9

Please sign in to comment.