diff options
author | sivarv <sivarv@microsoft.com> | 2016-12-08 15:40:20 -0800 |
---|---|---|
committer | sivarv <sivarv@microsoft.com> | 2016-12-08 19:00:02 -0800 |
commit | d1d06e7241ce9e27067bf6f57d280ad67ca03a74 (patch) | |
tree | 47bbc8dac1f58175a6c7e5788be8ac5b1dfc04a9 /src/jit | |
parent | 4d35a3a3dba0a4d2fc17e7b31dab87d8ac9b81dc (diff) | |
download | coreclr-d1d06e7241ce9e27067bf6f57d280ad67ca03a74.tar.gz coreclr-d1d06e7241ce9e27067bf6f57d280ad67ca03a74.tar.bz2 coreclr-d1d06e7241ce9e27067bf6f57d280ad67ca03a74.zip |
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 6813beb288..8dd6f4cd49 100644 --- a/src/jit/lsra.cpp +++ b/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; } |