summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2017-04-13 16:37:33 -0700
committerPat Gavlin <pagavlin@microsoft.com>2017-04-13 16:37:33 -0700
commit18e2c4ae47893c0f2ffdf19280f27d538ad9d4c1 (patch)
treed142ec9dd0270d7a2e69cb68e597049c06a29589 /src
parent583713bd78ab202c62ba6beec83db2204bd0a361 (diff)
downloadcoreclr-18e2c4ae47893c0f2ffdf19280f27d538ad9d4c1.tar.gz
coreclr-18e2c4ae47893c0f2ffdf19280f27d538ad9d4c1.tar.bz2
coreclr-18e2c4ae47893c0f2ffdf19280f27d538ad9d4c1.zip
Preserve VNs in fgMorphIntoHelperCall.
This method is used to transform a node into a semantically-equivalent helper call, and should preserve any value numbers that are present on the the node.
Diffstat (limited to 'src')
-rw-r--r--src/jit/morph.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index 92d5e0967e..308eaf04ee 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -60,7 +60,8 @@ GenTreePtr Compiler::fgMorphCastIntoHelper(GenTreePtr tree, int helper, GenTreeP
GenTreePtr Compiler::fgMorphIntoHelperCall(GenTreePtr tree, int helper, GenTreeArgList* args)
{
- tree->ChangeOper(GT_CALL);
+ // The helper call ought to be semantically equivalent to the original node, so preserve its VN.
+ tree->ChangeOper(GT_CALL, GenTree::PRESERVE_VN);
tree->gtFlags |= GTF_CALL;
if (args)