From: Chris Lattner Date: Sat, 19 Nov 2005 06:58:46 +0000 (+0000) Subject: Teach the graph viewer to handle register operands that are zero. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=44fa764355eec81d8ef8fbd63824695b1554c4ab;p=oota-llvm.git Teach the graph viewer to handle register operands that are zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24421 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 2c2bc214463..73535809333 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -82,7 +82,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += LBB->getName(); //Op += " " + (const void*)BBDN->getBasicBlock(); } else if (const RegisterSDNode *R = dyn_cast(Node)) { - if (G && MRegisterInfo::isPhysicalRegister(R->getReg())) { + if (G && R->getReg() != 0 && MRegisterInfo::isPhysicalRegister(R->getReg())) { Op = Op + " " + G->getTarget().getRegisterInfo()->getName(R->getReg()); } else { Op += " #" + utostr(R->getReg());