Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
[oota-llvm.git] / lib / CodeGen / RegAllocBigBlock.cpp
index 68c7936e3b91a0b3241cd8b07571706fac16701b..584aa7c7c0efa95d8bb5462d4bd54d672fcf1ca9 100644 (file)
@@ -808,14 +808,14 @@ void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) {
       if (PhysReg) {
         DOUT  << "  Register " << RegInfo->getName(PhysReg)
               << " [%reg" << VirtReg
-              << "] is never used, removing it frame live list\n";
+              << "] is never used, removing it from live set\n";
         removePhysReg(PhysReg);
         for (const unsigned *AliasSet = RegInfo->getAliasSet(PhysReg);
              *AliasSet; ++AliasSet) {
           if (PhysRegsUsed[*AliasSet] != -2) {
             DOUT  << "  Register " << RegInfo->getName(*AliasSet)
                   << " [%reg" << *AliasSet
-                  << "] is never used, removing it frame live list\n";
+                  << "] is never used, removing it from live set\n";
             removePhysReg(*AliasSet);
           }
         }
@@ -823,8 +823,9 @@ void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) {
     }
     
     // Finally, if this is a noop copy instruction, zap it.
-    unsigned SrcReg, DstReg;
-    if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg)
+    unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
+    if (TII.isMoveInstr(*MI, SrcReg, DstReg, SrcSubReg, DstSubReg) &&
+        SrcReg == DstReg)
       MBB.erase(MI);
   }