Skip to content

Do not assume about another half regrec #53412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5615,10 +5615,6 @@ void LinearScan::allocateRegisters()
// Return Value:
// None
//
// Assumptions:
// For ARM32, when "regType" is TYP_DOUBLE, "reg" should be a even-numbered
// float register, i.e. lower half of double register.
//
// Note:
// For ARM32, two float registers consisting a double register are updated
// together when "regType" is TYP_DOUBLE.
Expand All @@ -5631,8 +5627,8 @@ void LinearScan::updateAssignedInterval(RegRecord* reg, Interval* interval, Regi
regNumber doubleReg = REG_NA;
if (regType == TYP_DOUBLE)
{
doubleReg = reg->regNum;
RegRecord* anotherHalfReg = getSecondHalfRegRec(reg);
RegRecord* anotherHalfReg = findAnotherHalfRegRec(reg);
doubleReg = genIsValidDoubleReg(reg->regNum) ? reg->regNum : anotherHalfReg->regNum;
anotherHalfReg->assignedInterval = interval;
}
else if ((oldAssignedInterval != nullptr) && (oldAssignedInterval->registerType == TYP_DOUBLE))
Expand Down