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
This commit is contained in:
Dan Gohman 2009-04-13 15:16:56 +00:00
parent 3cd0aa3260
commit 6ed0e20eb2

View File

@ -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);