Skip to content

Commit 2ff635d

Browse files
authored
CodeGen: Stop checking for physregs in constrainRegClass (#161795)
It's nonsensical to call this function on a physical register.
1 parent 80fd3ed commit 2ff635d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/lib/CodeGen/MachineRegisterInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ constrainRegClass(MachineRegisterInfo &MRI, Register Reg,
8383

8484
const TargetRegisterClass *MachineRegisterInfo::constrainRegClass(
8585
Register Reg, const TargetRegisterClass *RC, unsigned MinNumRegs) {
86-
if (Reg.isPhysical())
87-
return nullptr;
8886
return ::constrainRegClass(*this, Reg, getRegClass(Reg), RC, MinNumRegs);
8987
}
9088

0 commit comments

Comments
 (0)