diff --git a/compiler/optimizer/GlobalRegisterAllocator.cpp b/compiler/optimizer/GlobalRegisterAllocator.cpp index 233a940d1db..cb97dc858cc 100644 --- a/compiler/optimizer/GlobalRegisterAllocator.cpp +++ b/compiler/optimizer/GlobalRegisterAllocator.cpp @@ -2733,11 +2733,12 @@ void TR_GlobalRegisterAllocator::offerAllAutosAndRegisterParmAsCandidates(TR::Bl if (paramCursor->getLinkageRegisterIndex() >= 0) rc->addAllBlocks(); } + + i = paramCursor->getLiveLocalIndex(); + autoAndParmLiveLocalIndex.set(i); + registerCandidateByIndex[i] = rc; } - i = paramCursor->getLiveLocalIndex(); - autoAndParmLiveLocalIndex.set(i); - registerCandidateByIndex[i] = rc; paramCursor = paramIterator.getNext(); }