Skip to content

Commit 9453b78

Browse files
committed
fixup! add TODO
1 parent 44f5809 commit 9453b78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,10 @@ bool RISCVRegisterInfo::getRegAllocationHints(
895895
// Check if this register matches the even/odd requirement
896896
bool IsOdd = (RegNum % 2 != 0);
897897

898-
// Skip unallocatable registers.
899-
if (MRI->isReserved(PhysReg))
900-
continue;
901898
// Verify the pair register exists and is in the same register class
899+
// TODO: Skip unallocatable registers: we need to prevent any of odd/even
900+
// to be reserved, so if we need odd, we need to check if corresponding
901+
// even is preserved, vice versa.
902902
if ((WantOdd && IsOdd) || (!WantOdd && !IsOdd))
903903
Hints.push_back(PhysReg);
904904
}

0 commit comments

Comments
 (0)