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
This commit is contained in:
Bob Wilson 2010-07-25 05:34:27 +00:00
parent 83b4a97060
commit 3f92f73970

View File

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