Skip to content

Commit 9934fad

Browse files
committed
use type size instead of unsigned when getting value mapping
1 parent 63fcb5f commit 9934fad

File tree

3 files changed

+310
-224
lines changed

3 files changed

+310
-224
lines changed

llvm/lib/CodeGen/RegisterBankInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ RegisterBankInfo::getInstrMappingImpl(const MachineInstr &MI) const {
215215
}
216216
}
217217

218-
unsigned Size = getSizeInBits(Reg, MRI, TRI);
219-
const ValueMapping *ValMapping = &getValueMapping(0, Size, *CurRegBank);
218+
TypeSize Size = getSizeInBits(Reg, MRI, TRI);
219+
const ValueMapping *ValMapping =
220+
&getValueMapping(0, Size.getKnownMinValue(), *CurRegBank);
220221
if (IsCopyLike) {
221222
if (!OperandsMapping[0]) {
222223
if (MI.isRegSequence()) {

0 commit comments

Comments
 (0)