diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2018-06-29 09:41:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-29 09:41:16 -0700 |
commit | 13e760637a4162f825cad6ba6cc27706cb96feef (patch) | |
tree | 81895ae29c21dd27ca16353bf625ce6db4c366d6 /src | |
parent | 65d31999eb89e11a74fe8cbf25982a3ed33a564f (diff) | |
parent | 965c96e5971e47a256bbd57ad27b75e6d71843cf (diff) | |
download | coreclr-13e760637a4162f825cad6ba6cc27706cb96feef.tar.gz coreclr-13e760637a4162f825cad6ba6cc27706cb96feef.tar.bz2 coreclr-13e760637a4162f825cad6ba6cc27706cb96feef.zip |
Merge pull request #18696 from CarolEidt/Fix18362
Fix & test for #18362
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/lsra.cpp | 4 | ||||
-rw-r--r-- | src/jit/lsraarmarch.cpp | 14 | ||||
-rw-r--r-- | src/jit/lsrabuild.cpp | 6 |
3 files changed, 17 insertions, 7 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 27d29dfb47..537aa06835 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -8728,6 +8728,10 @@ void LinearScan::dumpNodeInfo(GenTree* node, regMaskTP dstCandidates, int srcCou void LinearScan::dumpDefList() { + if (!VERBOSE) + { + return; + } JITDUMP("DefList: { "); bool first = true; for (RefInfoListNode *listNode = defList.Begin(), *end = defList.End(); listNode != end; diff --git a/src/jit/lsraarmarch.cpp b/src/jit/lsraarmarch.cpp index 1804d4caff..dad8a75197 100644 --- a/src/jit/lsraarmarch.cpp +++ b/src/jit/lsraarmarch.cpp @@ -512,16 +512,18 @@ int LinearScan::BuildPutArgSplit(GenTreePutArgSplit* argNode) assert(!node->IsMultiRegNode()); currentRegCount = 1; } - regMaskTP sourceMask = RBM_NONE; - if (sourceRegCount < argNode->gtNumRegs) + // Consume all the registers, setting the appropriate register mask for the ones that + // go into registers. + for (unsigned regIndex = 0; regIndex < currentRegCount; regIndex++) { - for (unsigned regIndex = 0; regIndex < currentRegCount; regIndex++) + regMaskTP sourceMask = RBM_NONE; + if (sourceRegCount < argNode->gtNumRegs) { - sourceMask |= genRegMask((regNumber)((unsigned)argReg + sourceRegCount + regIndex)); + sourceMask = genRegMask((regNumber)((unsigned)argReg + sourceRegCount)); } + sourceRegCount++; + BuildUse(node, sourceMask, regIndex); } - sourceRegCount += currentRegCount; - BuildUse(node, sourceMask); } srcCount += sourceRegCount; assert(putArgChild->isContained()); diff --git a/src/jit/lsrabuild.cpp b/src/jit/lsrabuild.cpp index 14a8ab7c6d..0d0efa9efa 100644 --- a/src/jit/lsrabuild.cpp +++ b/src/jit/lsrabuild.cpp @@ -2091,7 +2091,11 @@ void LinearScan::buildIntervals() // Note: the visited set is cleared in LinearScan::doLinearScan() markBlockVisited(block); - assert(defList.IsEmpty()); + if (!defList.IsEmpty()) + { + INDEBUG(dumpDefList()); + assert(!"Expected empty defList at end of block"); + } if (enregisterLocalVars) { |