From: sivarv Date: Thu, 8 Dec 2016 23:40:20 +0000 (-0800) Subject: Fix to issue 8287. X-Git-Tag: submit/tizen/20210909.063632~11030^2~8653^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a833fed64c22b46042e49dc07ff1d1d07aa2a6b4;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix to issue 8287. Commit migrated from https://github.com/dotnet/coreclr/commit/d1d06e7241ce9e27067bf6f57d280ad67ca03a74 --- diff --git a/src/coreclr/src/jit/lsra.cpp b/src/coreclr/src/jit/lsra.cpp index 6813beb..8dd6f4c 100644 --- a/src/coreclr/src/jit/lsra.cpp +++ b/src/coreclr/src/jit/lsra.cpp @@ -4854,11 +4854,11 @@ void LinearScan::setFrameType() compiler->rpFrameType = frameType; } -// Is the copyReg given by this RefPosition still busy at the +// Is the copyReg/moveReg given by this RefPosition still busy at the // given location? -bool copyRegInUse(RefPosition* ref, LsraLocation loc) +bool copyOrMoveRegInUse(RefPosition* ref, LsraLocation loc) { - assert(ref->copyReg); + assert(ref->copyReg || ref->moveReg); if (ref->getRefEndLocation() >= loc) { return true; @@ -4918,14 +4918,15 @@ bool LinearScan::registerIsAvailable(RegRecord* physRegRecord, return false; } - // Is this a copyReg? It is if the register assignment doesn't match. - // (the recentReference may not be a copyReg, because we could have seen another - // reference since the copyReg) + // Is this a copyReg/moveReg? It is if the register assignment doesn't match. + // (the recentReference may not be a copyReg/moveReg, because we could have seen another + // reference since the copyReg/moveReg) if (!assignedInterval->isAssignedTo(physRegRecord->regNum)) { // Don't reassign it if it's still in use - if (recentReference->copyReg && copyRegInUse(recentReference, currentLoc)) + if ((recentReference->copyReg || recentReference->moveReg) && + copyOrMoveRegInUse(recentReference, currentLoc)) { return false; }