Fix a misunderstanding about how RegMaskBlocks works. This was caught by
authorCameron Zwarich <zwarich@apple.com>
Wed, 20 Feb 2013 06:46:36 +0000 (06:46 +0000)
committerCameron Zwarich <zwarich@apple.com>
Wed, 20 Feb 2013 06:46:36 +0000 (06:46 +0000)
assertions in the register allocator when running 'make check' without
LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175599 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveIntervalAnalysis.h

index c0de49e52ab78638cfa75135ce56d4afd39768ec..46323681577206ea2987412e84245d8f4f05e868 100644 (file)
@@ -218,7 +218,7 @@ namespace llvm {
       Indexes->insertMBBInMaps(MBB);
       assert(unsigned(MBB->getNumber()) == RegMaskBlocks.size() &&
              "Blocks must be added in order.");
-      RegMaskBlocks.push_back(std::make_pair(MBB->getNumber(), 0));
+      RegMaskBlocks.push_back(std::make_pair(RegMaskSlots.size(), 0));
     }
 
     SlotIndex InsertMachineInstrInMaps(MachineInstr *MI) {