Skip to content

Commit

Permalink
Fix MSVC "cannot convert from 'llvm::Register' to 'llvm::MCRegister'"…
Browse files Browse the repository at this point in the history
… build error. NFCI.
  • Loading branch information
RKSimon committed Oct 2, 2023
1 parent 2984e35 commit 6741dd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/CodeGen/RegisterCoalescer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,8 +1434,9 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,

assert(MO.isImplicit() && MO.getReg().isPhysical() &&
(MO.isDead() ||
(DefSubIdx && (TRI->getSubReg(MO.getReg(), DefSubIdx) ==
MCRegister(NewMI.getOperand(0).getReg())))));
(DefSubIdx &&
(TRI->getSubReg(MO.getReg(), DefSubIdx) ==
MCRegister((unsigned)NewMI.getOperand(0).getReg())))));
NewMIImplDefs.push_back(MO.getReg().asMCReg());
} else {
assert(MO.getReg() == NewMI.getOperand(0).getReg() &&
Expand Down

0 comments on commit 6741dd0

Please sign in to comment.