From: Craig Topper Date: Fri, 21 Jun 2019 18:49:21 +0000 (+0000) Subject: [X86] Add a debug print of the node in the default case for unhandled opcodes in... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9123f85905631e22cac01f2a589ca097c42775a;p=llvm [X86] Add a debug print of the node in the default case for unhandled opcodes in ReplaceNodeResults. 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 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index caa8c1d47a1..7dce3276663 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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!");