summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/RegUsageInfoCollector.cpp')
-rw-r--r--llvm/lib/CodeGen/RegUsageInfoCollector.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
index 1bf205d5e60..6a976285ecc 100644
--- a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
+++ b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
@@ -96,7 +96,7 @@ bool RegUsageInfoCollector::runOnMachineFunction(MachineFunction &MF) {
// Compute the size of the bit vector to represent all the registers.
// The bit vector is broken into 32-bit chunks, thus takes the ceil of
// the number of registers divided by 32 for the size.
- unsigned RegMaskSize = (TRI->getNumRegs() + 31) / 32;
+ unsigned RegMaskSize = MachineOperand::getRegMaskSize(TRI->getNumRegs());
RegMask.resize(RegMaskSize, 0xFFFFFFFF);
const Function &F = MF.getFunction();
OpenPOWER on IntegriCloud