Skip to content

Commit d330731

Browse files
author
Serguei Katkov
committed
[RegAllocFast] Clean-up. Remove redundant operations. NFC.
Reviewed By: MatzeB, arsenm Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D109213
1 parent f8ee045 commit d330731

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

llvm/lib/CodeGen/RegAllocFast.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ void RegAllocFast::allocateInstruction(MachineInstr &MI) {
13541354
if (MRI->isReserved(Reg))
13551355
continue;
13561356
bool displacedAny = usePhysReg(MI, Reg);
1357-
if (!displacedAny && !MRI->isReserved(Reg))
1357+
if (!displacedAny)
13581358
MO.setIsKill(true);
13591359
}
13601360
}
@@ -1406,12 +1406,7 @@ void RegAllocFast::allocateInstruction(MachineInstr &MI) {
14061406
for (MachineOperand &MO : llvm::reverse(MI.operands())) {
14071407
if (!MO.isReg() || !MO.isDef() || !MO.isEarlyClobber())
14081408
continue;
1409-
// subreg defs don't free the full register. We left the subreg number
1410-
// around as a marker in setPhysReg() to recognize this case here.
1411-
if (MO.getSubReg() != 0) {
1412-
MO.setSubReg(0);
1413-
continue;
1414-
}
1409+
assert(!MO.getSubReg() && "should be already handled in def processing");
14151410

14161411
Register Reg = MO.getReg();
14171412
if (!Reg)

0 commit comments

Comments
 (0)