From 7f29c4e7048fcfb41ed9d009dfa93c73b7eb69d9 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 3 Jan 2024 11:36:05 -0800 Subject: [PATCH] Fix bug by using freeCandidates --- src/coreclr/jit/lsra.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index bd06de2017476..6ff2367643947 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -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; } // ---------------------------------------------------------- @@ -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();