From: Dan Gohman Date: Mon, 13 Apr 2009 15:16:56 +0000 (+0000) Subject: Add an assertion to verify that a copy was actually emitted. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6ed0e20eb2dee4b08d33917ba569ad448aa0f047;p=oota-llvm.git 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 8aa866ea29b..20770a17ef2 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -857,7 +857,8 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { 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);