Check for `lvLRACandidate` instead of `!lvDoNotEnregister` when checking whether `this` may be enregistered and has an Interval.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e41d8f0390323bba033a1ace2570c1099cf7443b
if (enregisterLocalVars && compiler->lvaKeepAliveAndReportThis())
{
LclVarDsc* thisVarDsc = compiler->lvaGetDesc(compiler->info.compThisArg);
- if (!thisVarDsc->lvDoNotEnregister)
+ if (thisVarDsc->lvLRACandidate)
{
Interval* interval = getIntervalForLocalVar(thisVarDsc->lvVarIndex);
if (interval->isSplit)