Skip to content

Commit

Permalink
Fix bug by using freeCandidates
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Jan 3, 2024
1 parent 4ae62ed commit 7f29c4e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12551,10 +12551,9 @@ void LinearScan::RegisterSelection::resetMinOpts(Interval* interval, RefPosition
currentInterval = interval;
refPosition = refPos;

regType = linearScan->getRegisterType(currentInterval, refPosition);
candidates = refPosition->registerAssignment;
freeCandidates = RBM_NONE;
found = false;
regType = linearScan->getRegisterType(currentInterval, refPosition);
candidates = refPosition->registerAssignment;
found = false;
}

// ----------------------------------------------------------
Expand Down Expand Up @@ -13891,7 +13890,7 @@ regMaskTP LinearScan::RegisterSelection::selectMinOpts(Interval* currentInter
return RBM_NONE;
}

freeCandidates = linearScan->getFreeCandidates(candidates ARM_ARG(regType));
candidates = linearScan->getFreeCandidates(candidates ARM_ARG(regType));

try_REG_ORDER();

Expand Down

0 comments on commit 7f29c4e

Please sign in to comment.