summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit280ce9984ec6d2496635e44a4decb77b10f6478a (patch)
tree55016c95b503d99aa68122aaa338828c3b81b7f1 /llvm/lib/CodeGen
parente602efc6f69edf010f416c324385c5ca281b2784 (diff)
downloadbcm5719-llvm-280ce9984ec6d2496635e44a4decb77b10f6478a.tar.gz
bcm5719-llvm-280ce9984ec6d2496635e44a4decb77b10f6478a.zip
Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
those. Radar 8231572. llvm-svn: 109367
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index b5e4ad9cdee..25e5b0ee4c0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud