summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index f31b2cc9db0..4504d18b33e 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -63,7 +63,7 @@ RegBankSelect::repairReg(unsigned Reg,
assert(ValMapping.BreakDown.size() == 1 &&
"Support for complex break down not supported yet");
const RegisterBankInfo::PartialMapping &PartialMap = ValMapping.BreakDown[0];
- assert(PartialMap.Mask.getBitWidth() ==
+ assert(PartialMap.Length ==
(TargetRegisterInfo::isPhysicalRegister(Reg)
? TRI->getMinimalPhysRegClass(Reg)->getSize() * 8
: MRI->getSize(Reg)) &&
@@ -111,8 +111,7 @@ RegBankSelect::repairReg(unsigned Reg,
}
// Create a new temporary to hold the repaired value.
- unsigned NewReg =
- MRI->createGenericVirtualRegister(PartialMap.Mask.getBitWidth());
+ unsigned NewReg = MRI->createGenericVirtualRegister(PartialMap.Length);
// Set the registers for the source and destination of the copy.
unsigned Src = Reg, Dst = NewReg;
// If this is a definition that we repair, the copy will be
OpenPOWER on IntegriCloud