[MIScheduler] Slightly better handling of constrainLocalCopy when both source and...
[oota-llvm.git] / lib / CodeGen / TwoAddressInstructionPass.cpp
index 428846a3ce256d5759bb75838657a43273490f12..e218a8387c53a8490afdfc20ffbe0880054644d2 100644 (file)
@@ -678,7 +678,7 @@ TwoAddressInstructionPass::scanUses(unsigned DstReg) {
   unsigned Reg = DstReg;
   while (MachineInstr *UseMI = findOnlyInterestingUse(Reg, MBB, MRI, TII,IsCopy,
                                                       NewReg, IsDstPhys)) {
-    if (IsCopy && !Processed.insert(UseMI))
+    if (IsCopy && !Processed.insert(UseMI).second)
       break;
 
     DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(UseMI);