[llvm] RegAllocFast: Fix verifier errors after assigning to reserved registers (PR #128155)
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 21 02:32:17 PST 2025
================
@@ -1215,16 +1218,30 @@ MCPhysReg RegAllocFastImpl::getErrorAssignment(const LiveReg &LR,
/// Changes operand OpNum in MI the refer the PhysReg, considering subregs.
/// \return true if MI's MachineOperands were re-arranged/invalidated.
bool RegAllocFastImpl::setPhysReg(MachineInstr &MI, MachineOperand &MO,
- MCPhysReg PhysReg) {
+ const LiveReg &Assignment) {
+ MCPhysReg PhysReg = Assignment.PhysReg;
+
+ assert(PhysReg);
----------------
perlfu wrote:
Should this assertion be here, given that !PhysReg is handled below?
https://github.com/llvm/llvm-project/pull/128155
More information about the llvm-commits
mailing list