[llvm-commits] [llvm] r64184 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
Evan Cheng
evan.cheng at apple.com
Mon Feb 9 14:47:36 PST 2009
Author: evancheng
Date: Mon Feb 9 16:47:36 2009
New Revision: 64184
URL: http://llvm.org/viewvc/llvm-project?rev=64184&view=rev
Log:
If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp?rev=64184&r1=64183&r2=64184&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp Mon Feb 9 16:47:36 2009
@@ -125,10 +125,11 @@
} else {
// Create the reg, emit the copy.
VRBase = MRI.createVirtualRegister(DstRC);
- bool Emitted =
- TII->copyRegToReg(*BB, End, VRBase, SrcReg, DstRC, SrcRC);
- Emitted = Emitted; // Silence compiler warning.
- assert(Emitted && "Unable to issue a copy instruction!");
+ bool Emitted = TII->copyRegToReg(*BB, End, VRBase, SrcReg, DstRC, SrcRC);
+ if (!Emitted) {
+ cerr << "Unable to issue a copy instruction!\n";
+ abort();
+ }
}
SDValue Op(Node, ResNo);
@@ -529,7 +530,11 @@
else
DstTRC = TRI->getPhysicalRegisterRegClass(DestReg,
Node->getOperand(1).getValueType());
- TII->copyRegToReg(*BB, End, DestReg, SrcReg, DstTRC, SrcTRC);
+ bool Emitted = TII->copyRegToReg(*BB, End, DestReg, SrcReg, DstTRC, SrcTRC);
+ if (!Emitted) {
+ cerr << "Unable to issue a copy instruction!\n";
+ abort();
+ }
break;
}
case ISD::CopyFromReg: {
More information about the llvm-commits
mailing list