summaryrefslogtreecommitdiff
path: root/src/jit/lsra.cpp
diff options
context:
space:
mode:
authorsivarv <sivarv@microsoft.com>2016-11-04 17:13:57 -0700
committersivarv <sivarv@microsoft.com>2016-11-04 17:52:06 -0700
commit5daa22db6821480099ed43b15488c6a91878de37 (patch)
tree73245d4a4354b412c7f9dbc6a3edc34b9272cc42 /src/jit/lsra.cpp
parentb67ff5ed804ba161ca7c80ad29893e9e9ebbe470 (diff)
downloadcoreclr-5daa22db6821480099ed43b15488c6a91878de37.tar.gz
coreclr-5daa22db6821480099ed43b15488c6a91878de37.tar.bz2
coreclr-5daa22db6821480099ed43b15488c6a91878de37.zip
While unassigning a phyReg, establish association with a previous interval
only if it is different from the one it is unassigned.
Diffstat (limited to 'src/jit/lsra.cpp')
-rw-r--r--src/jit/lsra.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp
index d2fbd387f9..3b22f1d8b6 100644
--- a/src/jit/lsra.cpp
+++ b/src/jit/lsra.cpp
@@ -6184,7 +6184,8 @@ void LinearScan::unassignPhysReg(RegRecord* regRec, RefPosition* spillRefPositio
{
assignedInterval->assignedReg = regRec;
}
- else if (regRec->previousInterval != nullptr && regRec->previousInterval->assignedReg == regRec &&
+ else if (regRec->previousInterval != nullptr && regRec->previousInterval != assignedInterval &&
+ regRec->previousInterval->assignedReg == regRec &&
regRec->previousInterval->getNextRefPosition() != nullptr)
{
regRec->assignedInterval = regRec->previousInterval;