Skip to content

Commit 72282a8

Browse files
committed
Fixups
1 parent af055e9 commit 72282a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
14741474
//
14751475
// The implicit-def of the super register may have been reduced to
14761476
// subregisters depending on the uses.
1477-
SmallVector<std::pair<unsigned, MCRegister>, 4> NewMIImplDefs;
1477+
SmallVector<std::pair<unsigned, Register>, 4> NewMIImplDefs;
14781478
for (unsigned i = NewMI.getDesc().getNumOperands(),
14791479
e = NewMI.getNumOperands();
14801480
i != e; ++i) {
@@ -1489,7 +1489,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
14891489
MCRegister((unsigned)NewMI.getOperand(0).getReg())) ||
14901490
TRI->isSubRegisterEq(NewMI.getOperand(0).getReg(),
14911491
MO.getReg())))));
1492-
NewMIImplDefs.push_back({i, MO.getReg().asMCReg()});
1492+
NewMIImplDefs.push_back({i, MO.getReg()});
14931493
} else {
14941494
assert(MO.getReg() == NewMI.getOperand(0).getReg());
14951495

@@ -1643,7 +1643,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
16431643

16441644
bool HasDefMatchingCopy = false;
16451645
for (auto [OpIndex, Reg] : NewMIImplDefs) {
1646-
if (Reg != DstReg.asMCReg())
1646+
if (Reg != DstReg)
16471647
continue;
16481648
// Also, if CopyDstReg is a sub-register of DstReg (and it is defined), we
16491649
// must mark DstReg as dead since it is not going to used as a result of
@@ -1688,8 +1688,8 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
16881688
NewMI.addOperand(MO);
16891689

16901690
SlotIndex NewMIIdx = LIS->getInstructionIndex(NewMI);
1691-
for (MCRegister Reg : make_second_range(NewMIImplDefs)) {
1692-
for (MCRegUnit Unit : TRI->regunits(Reg))
1691+
for (Register Reg : make_second_range(NewMIImplDefs)) {
1692+
for (MCRegUnit Unit : TRI->regunits(Reg.asMCReg()))
16931693
if (LiveRange *LR = LIS->getCachedRegUnit(Unit))
16941694
LR->createDeadDef(NewMIIdx.getRegSlot(), LIS->getVNInfoAllocator());
16951695
}

0 commit comments

Comments
 (0)