Add an assertion to verify that a copy was actually emitted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68953 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index 8aa866e..20770a1 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -857,7 +857,8 @@
             ReMatRegs.set(regB);
             ++NumReMats;
           } else {
-            TII->copyRegToReg(*mbbi, mi, regA, regB, rc, rc);
+            bool Emitted = TII->copyRegToReg(*mbbi, mi, regA, regB, rc, rc);
+            assert(Emitted && "Unable to issue a copy instruction!\n");
           }
 
           MachineBasicBlock::iterator prevMI = prior(mi);