From 4fbb98ee7dc7b231eb11aa5b0ac392b972aad6bc Mon Sep 17 00:00:00 2001 From: Michelle McDaniel Date: Thu, 29 Sep 2016 10:02:31 -0700 Subject: [PATCH] Copy GTF_ALL_EFFECTS to hiResult in decomp We need to make sure that the hiResult in decompose gets the same effect flags as the original tree. This change updates decompose methods to pass those flags from the tree to the hiResult in the cases that they weren't being passed before. --- src/jit/decomposelongs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jit/decomposelongs.cpp b/src/jit/decomposelongs.cpp index 2f0dfbe..5fb7a19 100644 --- a/src/jit/decomposelongs.cpp +++ b/src/jit/decomposelongs.cpp @@ -819,6 +819,7 @@ GenTree* DecomposeLongs::DecomposeInd(LIR::Use& use) GenTreePtr addrHigh = new (m_compiler, GT_LEA) GenTreeAddrMode(TYP_REF, addrBaseHigh, nullptr, 0, genTypeSize(TYP_INT)); GenTreePtr indHigh = new (m_compiler, GT_IND) GenTreeIndir(GT_IND, TYP_INT, addrHigh, nullptr); + indHigh->gtFlags |= (indLow->gtFlags & (GTF_GLOB_REF | GTF_EXCEPT | GTF_IND_FLAGS)); m_compiler->lvaIncRefCnts(addrBaseHigh); @@ -1309,6 +1310,7 @@ GenTree* DecomposeLongs::DecomposeShift(LIR::Use& use) GenTreeArgList* argList = m_compiler->gtNewArgList(loOp1, hiOp1, shiftByOp); GenTree* call = m_compiler->gtNewHelperCallNode(helper, TYP_LONG, 0, argList); + call->gtFlags |= tree->gtFlags & GTF_ALL_EFFECT; GenTreeCall* callNode = call->AsCall(); ReturnTypeDesc* retTypeDesc = callNode->GetReturnTypeDesc(); -- 2.7.4