Roll out r126169 and r126170 in an attempt to fix the selfhost bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index c1be3e9..452f561 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -644,10 +644,7 @@
           !RegisterVT.isInteger() || RegisterVT.isVector() ||
           !FuncInfo.LiveOutRegInfo.inBounds(Regs[Part+i]))
         continue;
-
-      if (FuncInfo.PHIDestRegs.count(Regs[Part+i]) && !FuncInfo.AllPredsVisited)
-        continue;
-
+      
       const FunctionLoweringInfo::LiveOutInfo &LOI =
         FuncInfo.LiveOutRegInfo[Regs[Part+i]];
 
@@ -6469,9 +6466,6 @@
         }
       }
 
-      if (!EnableFastISel)
-        FuncInfo.PHISrcToDestMap[Reg] = FuncInfo.ValueMap[PN];
-
       // Remember that this register needs to added to the machine PHI node as
       // the input for this MBB.
       SmallVector<EVT, 4> ValueVTs;