diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2018-12-14 16:00:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 16:00:36 -0800 |
commit | ca65764c029f2dac6f4a187694f4232eec9b1115 (patch) | |
tree | 9d3c758a61640c300c5e9dd90828cf85fd160cb7 /src/jit/codegenlinear.cpp | |
parent | 813bd6ec05c8ce81f3ec7b59f21966ebc9420dca (diff) | |
parent | 61bdd1c239ce0f0c575b3ecc62e2c29ce9e27ede (diff) | |
download | coreclr-ca65764c029f2dac6f4a187694f4232eec9b1115.tar.gz coreclr-ca65764c029f2dac6f4a187694f4232eec9b1115.tar.bz2 coreclr-ca65764c029f2dac6f4a187694f4232eec9b1115.zip |
Merge pull request #21535 from CarolEidt/Fix21500
Update var life for multireg local
Diffstat (limited to 'src/jit/codegenlinear.cpp')
-rw-r--r-- | src/jit/codegenlinear.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/jit/codegenlinear.cpp b/src/jit/codegenlinear.cpp index 2c0656d077..7da1896589 100644 --- a/src/jit/codegenlinear.cpp +++ b/src/jit/codegenlinear.cpp @@ -512,15 +512,30 @@ void CodeGen::genCodeForBBlist() // it up to date for vars that are not register candidates // (it would be nice to have a xor set function) - VARSET_TP extraLiveVars(VarSetOps::Diff(compiler, block->bbLiveOut, compiler->compCurLife)); - VarSetOps::UnionD(compiler, extraLiveVars, VarSetOps::Diff(compiler, compiler->compCurLife, block->bbLiveOut)); - VarSetOps::Iter extraLiveVarIter(compiler, extraLiveVars); - unsigned extraLiveVarIndex = 0; - while (extraLiveVarIter.NextElem(&extraLiveVarIndex)) + VARSET_TP mismatchLiveVars(VarSetOps::Diff(compiler, block->bbLiveOut, compiler->compCurLife)); + VarSetOps::UnionD(compiler, mismatchLiveVars, + VarSetOps::Diff(compiler, compiler->compCurLife, block->bbLiveOut)); + VarSetOps::Iter mismatchLiveVarIter(compiler, mismatchLiveVars); + unsigned mismatchLiveVarIndex = 0; + bool foundMismatchedRegVar = false; + while (mismatchLiveVarIter.NextElem(&mismatchLiveVarIndex)) { - unsigned varNum = compiler->lvaTrackedToVarNum[extraLiveVarIndex]; + unsigned varNum = compiler->lvaTrackedToVarNum[mismatchLiveVarIndex]; LclVarDsc* varDsc = compiler->lvaTable + varNum; - assert(!varDsc->lvIsRegCandidate()); + if (varDsc->lvIsRegCandidate()) + { + if (!foundMismatchedRegVar) + { + JITDUMP("Mismatched live reg vars after BB%02u:", block->bbNum); + foundMismatchedRegVar = true; + } + JITDUMP(" V%02u", varNum); + } + } + if (foundMismatchedRegVar) + { + assert(!"Found mismatched live reg var(s) after block"); + JITDUMP("\n"); } #endif |