diff options
Diffstat (limited to 'src/coreclr/jit')
-rw-r--r-- | src/coreclr/jit/lsra.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index a2bb138ad0c..ecd4dbd9e46 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -11264,8 +11264,8 @@ void LinearScan::RegisterSelection::try_SPILL_COST() RefPosition* recentRefPosition = spillCandidateRegRecord->assignedInterval != nullptr ? spillCandidateRegRecord->assignedInterval->recentRefPosition : nullptr; - if ((recentRefPosition != nullptr) && (recentRefPosition->RegOptional()) && - !(currentInterval->isLocalVar && recentRefPosition->IsActualRef())) + if ((recentRefPosition != nullptr) && (recentRefPosition->RegOptional() && + !(spillCandidateRegRecord->assignedInterval->isLocalVar && recentRefPosition->IsActualRef()))) { // We do not "spillAfter" if previous (recent) refPosition was regOptional or if it // is not an actual ref. In those cases, we will reload in future (next) refPosition. |