diff options
author | Sivarv <sivarv@microsoft.com> | 2016-12-09 11:30:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 11:30:30 -0800 |
commit | bc8a09288df831a4ad02b645c4d078261d1ceb70 (patch) | |
tree | 30952c14c2bffa37c3e035bfe652fc238d00791c /src/jit | |
parent | 7adcc81a8adc10e3fbd47a1dcf2d1218cedaf58c (diff) | |
parent | d1d06e7241ce9e27067bf6f57d280ad67ca03a74 (diff) | |
download | coreclr-bc8a09288df831a4ad02b645c4d078261d1ceb70.tar.gz coreclr-bc8a09288df831a4ad02b645c4d078261d1ceb70.tar.bz2 coreclr-bc8a09288df831a4ad02b645c4d078261d1ceb70.zip |
Merge pull request #8544 from sivarv/moveRegFix
Fix to issue 8287.
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/lsra.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 56d8b10af6..f298af0c0c 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -4898,11 +4898,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; @@ -4962,14 +4962,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; } |