aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-07-25 05:34:27 +0000
committerBob Wilson <bob.wilson@apple.com>2010-07-25 05:34:27 +0000
commit3f92f73970862c1926b4c70fe097c979de5f02d0 (patch)
tree8207d759a61ecdfd860ab865e94c3baafaab13c2 /lib/CodeGen
parent83b4a97060c2c0a2ab08b8755c8f0915c49fd0cb (diff)
Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
those. Radar 8231572. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index b5e4ad9cde..25e5b0ee4c 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1313,7 +1313,7 @@ namespace {
}
}
- if (SU->NumSuccs) {
+ if (SU->NumSuccs && N->getOpcode() != ISD::CopyToReg) {
unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();
for (unsigned i = 0; i != NumDefs; ++i) {
EVT VT = N->getValueType(i);
@@ -1394,7 +1394,7 @@ namespace {
}
}
- if (SU->NumSuccs) {
+ if (SU->NumSuccs && N->getOpcode() != ISD::CopyToReg) {
unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();
for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {
EVT VT = N->getValueType(i);