Skip to content

Commit

Permalink
Update def flags in gtCloneExpr (#77378)
Browse files Browse the repository at this point in the history
Limit to cases where are actually performing replacements to mitigate TP impact.
  • Loading branch information
SingleAccretion authored Oct 24, 2022
1 parent 58a1180 commit cc140fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8777,6 +8777,10 @@ GenTree* Compiler::gtCloneExpr(
// Update side effect flags since they may be different from the source side effect flags.
// For example, we may have replaced some locals with constants and made indirections non-throwing.
gtUpdateNodeSideEffects(copy);
if ((varNum != BAD_VAR_NUM) && copy->OperIsSsaDef())
{
fgAssignSetVarDef(copy);
}
}

/* GTF_COLON_COND should be propagated from 'tree' to 'copy' */
Expand Down

0 comments on commit cc140fc

Please sign in to comment.