From a22eae01633ad2e2a72f5af3aa361c65a3694994 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 19 Nov 2005 06:58:46 +0000 Subject: [PATCH] Teach the graph viewer to handle register operands that are zero. llvm-svn: 24421 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 2c2bc2144631..73535809333f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/llvm/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());