]> granicus.if.org Git - llvm/commitdiff
[X86] Add a debug print of the node in the default case for unhandled opcodes in...
authorCraig Topper <craig.topper@intel.com>
Fri, 21 Jun 2019 18:49:21 +0000 (18:49 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 21 Jun 2019 18:49:21 +0000 (18:49 +0000)
This should be unreachable, but bugs can make it reachable. This
adds a debug print so we can see the bad node in the output when
the llvm_unreachable triggers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364091 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index caa8c1d47a138b9a35bb346c7ff76e9aa5f9748c..7dce32766633f4058fc8aa93317c24959a3e98e0 100644 (file)
@@ -27262,6 +27262,10 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
   SDLoc dl(N);
   switch (N->getOpcode()) {
   default:
+#ifndef NDEBUG
+    dbgs() << "ReplaceNodeResults: ";
+    N->dump(&DAG);
+#endif
     llvm_unreachable("Do not know how to custom type legalize this operation!");
   case ISD::CTPOP: {
     assert(N->getValueType(0) == MVT::i64 && "Unexpected VT!");