[llvm-commits] [llvm] r109367 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Bob Wilson bob.wilson at apple.com
Sat Jul 24 22:34:28 PDT 2010


Author: bwilson
Date: Sun Jul 25 00:34:27 2010
New Revision: 109367

URL: http://llvm.org/viewvc/llvm-project?rev=109367&view=rev
Log:
Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
those.  Radar 8231572.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=109367&r1=109366&r2=109367&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sun Jul 25 00:34:27 2010
@@ -1313,7 +1313,7 @@
         }
       }
 
-      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 @@
         }
       }
 
-      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);





More information about the llvm-commits mailing list