Handle the case where target-specific fastisel code doesn't have
a desired opcode.

llvm-svn: 55005
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index f4d4539..62fac06 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -33,6 +33,11 @@
         return I;
       }
       unsigned ResultReg = FastEmit_rr(VT.getSimpleVT(), ISD::ADD, Op0, Op1);
+      if (ResultReg == 0) {
+        // Target-specific code wasn't able to find a machine opcode for
+        // the given ISD opcode and type. Halt "fast" selection and bail.
+        return I;
+      }
       ValueMap[I] = ResultReg;
       break;
     }