Skip to content

Commit af32e22

Browse files
committed
Add comment
1 parent fc19803 commit af32e22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/CodeGen/RegAllocFast.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,8 @@ bool RegAllocFastImpl::setPhysReg(MachineInstr &MI, MachineOperand &MO,
12231223
assert(PhysReg && "assignments should always be to a valid physreg");
12241224

12251225
if (LLVM_UNLIKELY(Assignment.Error)) {
1226+
// Make sure we don't set renamable in error scenarios, as we may have
1227+
// assigned to a reserved register.
12261228
if (MO.isUse())
12271229
MO.setIsUndef(true);
12281230
}

0 commit comments

Comments
 (0)