From 6741dd0696d3b9726e506823a43e96c6b8ba575e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 2 Oct 2023 12:41:08 +0100 Subject: [PATCH] Fix MSVC "cannot convert from 'llvm::Register' to 'llvm::MCRegister'" build error. NFCI. --- llvm/lib/CodeGen/RegisterCoalescer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index a52b395dcfc846..c388cf41df55d6 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -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() &&