Reapply r55191 and r55192.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55205 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 9304c0e..e13cfc0 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -5113,7 +5113,7 @@
       cast<BranchInst>(LLVMBB->getTerminator())->isUnconditional()) {
     if (FastISel *F = TLI.createFastISel(FuncInfo.MF)) {
       Begin = F->SelectInstructions(Begin, LLVMBB->end(),
-                                    FuncInfo.ValueMap, BB);
+                                    FuncInfo.ValueMap, FuncInfo.MBBMap, BB);
 
       // Clean up the FastISel object. TODO: Reorganize what data is
       // stored in the FastISel class itself and what is merely passed