enhance the new isel to use SelectNodeTo for most patterns,
even some the old isel didn't.  There are several parts of
this that make me feel dirty, but it's no worse than the
old isel.  I'll clean up the parts I can do without ripping
out the old one next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97415 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp
index 942a612..aec1e18 100644
--- a/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -416,18 +416,23 @@
     
     // Print the result #'s for EmitNode.
     if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) {
-      if (EN->getVT(0) != MVT::Flag && EN->getVT(0) != MVT::Other) {
+      if (unsigned NumResults = EN->getNumNonChainFlagVTs()) {
         OS.PadToColumn(CommentIndent) << "// Results = ";
         unsigned First = E->getFirstResultSlot();
-        for (unsigned i = 0, e = EN->getNumVTs(); i != e; ++i) {
-          if (EN->getVT(0) == MVT::Flag || EN->getVT(0) == MVT::Other)
-            break;
+        for (unsigned i = 0; i != NumResults; ++i)
           OS << "#" << First+i << " ";
-        }
       }
     }
-    
     OS << '\n';
+    
+    if (const SelectNodeToMatcher *SNT = dyn_cast<SelectNodeToMatcher>(N)) {
+      OS.PadToColumn(Indent*2) << "// Src: "
+      << *SNT->getPattern().getSrcPattern() << '\n';
+      OS.PadToColumn(Indent*2) << "// Dst: " 
+      << *SNT->getPattern().getDstPattern() << '\n';
+      
+    }
+    
     return 6+EN->getNumVTs()+NumOperandBytes;
   }
   case Matcher::MarkFlagResults: {