Move the code that starts printing the Select_* functions
[oota-llvm.git] / utils / TableGen / FastISelEmitter.cpp
index 5e3876369eef4e6587184c781742bc1f07671b61..201a2cc5fef5c1ffef930fea5d8db059367858e7 100644 (file)
@@ -71,7 +71,7 @@ struct OperandsSignature {
     for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
       TreePatternNode *Op = InstPatNode->getChild(i);
       // For now, filter out any operand with a predicate.
-      if (!Op->getPredicateFn().empty())
+      if (!Op->getPredicateFns().empty())
         return false;
       // For now, filter out any operand with multiple values.
       if (Op->getExtTypes().size() != 1)
@@ -309,7 +309,7 @@ void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) {
       continue;
 
     // For now, filter out any instructions with predicates.
-    if (!InstPatNode->getPredicateFn().empty())
+    if (!InstPatNode->getPredicateFns().empty())
       continue;
 
     // Check all the operands.
@@ -440,7 +440,8 @@ void FastISelMap::PrintFunctionDefinitions(std::ostream &OS) {
                 Operands.PrintArguments(OS, *Memo.PhysRegs);
                 OS << ");\n";
               } else {
-                OS << "extractsubreg(Op0, ";
+                OS << "extractsubreg(" << getName(RetVT);
+                OS << ", Op0, ";
                 OS << (unsigned)Memo.SubRegNo;
                 OS << ");\n";
               }
@@ -534,7 +535,7 @@ void FastISelMap::PrintFunctionDefinitions(std::ostream &OS) {
               Operands.PrintArguments(OS, *Memo.PhysRegs);
               OS << ");\n";
             } else {
-              OS << "extractsubreg(Op0, ";
+              OS << "extractsubreg(RetVT, Op0, ";
               OS << (unsigned)Memo.SubRegNo;
               OS << ");\n";
             }