summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-12-08 15:18:42 -0800
committerPat Gavlin <pagavlin@microsoft.com>2016-12-08 15:24:11 -0800
commit8b65d160640b0f9a761ca905610409fa5bc35372 (patch)
tree9eb4590b37d5e6782ccba930935056539cb2eebc /src/jit
parentbf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e (diff)
downloadcoreclr-8b65d160640b0f9a761ca905610409fa5bc35372.tar.gz
coreclr-8b65d160640b0f9a761ca905610409fa5bc35372.tar.bz2
coreclr-8b65d160640b0f9a761ca905610409fa5bc35372.zip
Correct an assertion in LSRA.
`verifyFinalAllocation` asserts that if a non-BB interval RefPosition that is either spilled or is the interval's last use does not have a register, then that ref position must be marked `AllocateIfProfitable`. However, this situation can also arise in at least one other situation: an unused parameter will have at least one ref position that may not be allocated to a register. This change corrects the assertion to check `RefPosition::RequiresRegister` rather than `RefPosition::AllocateIfProfitable`. Fixes VSO 299207.
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/lsra.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp
index 6813beb288..249ab4a982 100644
--- a/src/jit/lsra.cpp
+++ b/src/jit/lsra.cpp
@@ -11788,15 +11788,14 @@ void LinearScan::verifyFinalAllocation()
interval->physReg = REG_NA;
interval->assignedReg = nullptr;
- // regRegcord could be null if RefPosition is to be allocated a
- // reg only if profitable.
+ // regRegcord could be null if the RefPosition does not require a register.
if (regRecord != nullptr)
{
regRecord->assignedInterval = nullptr;
}
else
{
- assert(currentRefPosition->AllocateIfProfitable());
+ assert(!currentRefPosition->RequiresRegister());
}
}
}