Skip to content

Commit

Permalink
Don't change op2
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo committed Jul 19, 2021
1 parent 07f93fe commit bedbd5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11040,8 +11040,9 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
//

GenTree* op2Var = op2;
if (isCastClass || partialExpand)
if (isCastClass)
{
assert(!partialExpand);
op2Var = fgInsertCommaFormTemp(&op2);
lvaTable[op2Var->AsLclVarCommon()->GetLclNum()].lvIsCSE = true;
}
Expand Down Expand Up @@ -11075,7 +11076,7 @@ GenTree* Compiler::impCastClassOrIsInstToTree(
}
else if (partialExpand)
{
condTrue = gtNewHelperCallNode(helper, TYP_REF, gtNewCallArgs(op2Var, gtClone(op1)));
condTrue = gtNewHelperCallNode(helper, TYP_REF, gtNewCallArgs(op2, gtClone(op1)));
}
else
{
Expand Down

0 comments on commit bedbd5c

Please sign in to comment.