Last commit accidentially deleted this code.
[oota-llvm.git] / lib / CodeGen / VirtRegMap.cpp
index 0103e2042f3007d6295c6a97c2af8a45e838f0db..461d839f1c0965027bbd822edfeb229922fe2e6a 100644 (file)
@@ -1637,6 +1637,10 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM,
             PotentialDeadStoreSlots.push_back(ReuseSlot);
           }
 
+          // Assumes this is the last use. IsKill will be unset if reg is reused
+          // unless it's a two-address operand.
+          if (ti == -1)
+            MI.getOperand(i).setIsKill();
           continue;
         }  // CanReuse