sink special case "cannotyetselect" for intrinsics out of the
tblgen splatted code into the implementation.
llvm-svn: 96460
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index eead526..9ba0d55 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1444,6 +1444,11 @@
}
void SelectionDAGISel::CannotYetSelect(SDNode *N) {
+ if (N->getOpcode() == ISD::INTRINSIC_W_CHAIN ||
+ N->getOpcode() == ISD::INTRINSIC_WO_CHAIN ||
+ N->getOpcode() == ISD::INTRINSIC_VOID)
+ return CannotYetSelectIntrinsic(N);
+
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Cannot yet select: ";
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index 1ac2d94..e0e2573 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -1841,13 +1841,7 @@
// catch the case where nothing handles a pattern.
if (mightNotMatch) {
OS << "\n";
- if (OpName != "ISD::INTRINSIC_W_CHAIN" &&
- OpName != "ISD::INTRINSIC_WO_CHAIN" &&
- OpName != "ISD::INTRINSIC_VOID")
- OS << " CannotYetSelect(N);\n";
- else
- OS << " CannotYetSelectIntrinsic(N);\n";
-
+ OS << " CannotYetSelect(N);\n";
OS << " return NULL;\n";
}
OS << "}\n\n";
@@ -1948,13 +1942,7 @@
}
OS << " } // end of big switch.\n\n"
- << " if (N->getOpcode() != ISD::INTRINSIC_W_CHAIN &&\n"
- << " N->getOpcode() != ISD::INTRINSIC_WO_CHAIN &&\n"
- << " N->getOpcode() != ISD::INTRINSIC_VOID) {\n"
- << " CannotYetSelect(N);\n"
- << " } else {\n"
- << " CannotYetSelectIntrinsic(N);\n"
- << " }\n"
+ << " CannotYetSelect(N);\n"
<< " return NULL;\n"
<< "}\n\n";
}