summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-09 22:47:36 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-09 22:47:36 +0000
commit3af42a8a147f2f6bc594f41045b1e2b05d0e30ac (patch)
treec7b888314c245c7dd6dbff233d1b6abf196b84e7 /llvm/lib/CodeGen
parentcd1996775463b004a25149157e76a6035a264700 (diff)
downloadbcm5719-llvm-3af42a8a147f2f6bc594f41045b1e2b05d0e30ac.tar.gz
bcm5719-llvm-3af42a8a147f2f6bc594f41045b1e2b05d0e30ac.zip
If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
llvm-svn: 64184
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
index aa29d3efa77..1d369c1bc44 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
@@ -125,10 +125,11 @@ void ScheduleDAGSDNodes::EmitCopyFromReg(SDNode *Node, unsigned ResNo,
} 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 @@ void ScheduleDAGSDNodes::EmitNode(SDNode *Node, bool IsClone, bool IsCloned,
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: {
OpenPOWER on IntegriCloud