Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunal Pathak <Kunal.Pathak@microsoft.com>2021-07-08 03:51:52 +0300
committerGitHub <noreply@github.com>2021-07-08 03:51:52 +0300
commit7f88911fe5f89836d1de7efd23f8541514a5ed05 (patch)
treec65d5ab25854d17db33a05988e36a2a4a7f10d70 /src/coreclr/jit
parent893739ffe77df0eb927d3755e08647597dae32a6 (diff)
Use correct assignedInterval for SPILL_COST calculation (#55247)
Diffstat (limited to 'src/coreclr/jit')
-rw-r--r--src/coreclr/jit/lsra.cpp4
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.