OSDN Git Service

Revert 127368 and 127371 for now.
[android-x86/external-llvm.git] / lib / CodeGen / SelectionDAG / ScheduleDAGFast.cpp
index 7b560d1..e3da208 100644 (file)
@@ -570,20 +570,13 @@ void ScheduleDAGFast::ListScheduleBottomUp() {
           TRI->getMinimalPhysRegClass(Reg, VT);
         const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
 
-        // If cross copy register class is the same as RC, then it must be
-        // possible copy the value directly. Do not try duplicate the def.
-        // If cross copy register class is not the same as RC, then it's
-        // possible to copy the value but it require cross register class copies
-        // and it is expensive.
-        // If cross copy register class is null, then it's not possible to copy
-        // the value at all.
+        // If cross copy register class is null, then it must be possible copy
+        // the value directly. Do not try duplicate the def.
         SUnit *NewDef = 0;
-        if (DestRC != RC) {
+        if (DestRC)
           NewDef = CopyAndMoveSuccessors(LRDef);
-          if (!DestRC && !NewDef)
-            report_fatal_error("Can't handle live physical "
-                               "register dependency!");
-        }
+        else
+          DestRC = RC;
         if (!NewDef) {
           // Issue copies, these can be expensive cross register class copies.
           SmallVector<SUnit*, 2> Copies;