Fix local var ref counts in IND/STOREIND decomposition
authorBruce Forstall <brucefo@microsoft.com>
Wed, 24 Aug 2016 00:38:30 +0000 (17:38 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Wed, 24 Aug 2016 00:38:30 +0000 (17:38 -0700)
When creating new references to a local variable in long decomposition,
the variable reference count must be incremented.

Fixes dotnet/coreclr#6588

Commit migrated from https://github.com/dotnet/coreclr/commit/9fe631c1ae3ce12b05de6fdcc7eba465be8ec2ec

src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/tests/issues.targets

index d0502af..63a7b60 100644 (file)
@@ -707,6 +707,8 @@ GenTree* DecomposeLongs::DecomposeStoreInd(LIR::Use& use)
     storeIndHigh->gtFlags = (storeIndLow->gtFlags & (GTF_ALL_EFFECT | GTF_LIVENESS_MASK));
     storeIndHigh->gtFlags |= GTF_REVERSE_OPS;
 
+    m_compiler->lvaIncRefCnts(addrBaseHigh);
+
     BlockRange().InsertAfter(storeIndLow, dataHigh, addrBaseHigh, addrHigh, storeIndHigh);
 
     return storeIndHigh;
@@ -783,6 +785,8 @@ GenTree* DecomposeLongs::DecomposeInd(LIR::Use& use)
         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);
 
+    m_compiler->lvaIncRefCnts(addrBaseHigh);
+
     BlockRange().InsertAfter(indLow, addrBaseHigh, addrHigh, indHigh);
 
     return FinalizeDecomposition(use, indLow, indHigh);
index dbd7caa..6863c78 100644 (file)
         <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\perffix\primitivevt\mixed1_cs_do\mixed1_cs_do.cmd">
              <Issue>6097</Issue>
         </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Regression\CLR-x86-JIT\V1-M11-Beta1\b44410\b44410\b44410.cmd">
-             <Issue>6588</Issue>
-        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)\JIT\jit64\eh\basics\loopEH\loopEH.cmd">
              <Issue>6778</Issue>
         </ExcludeList>