From 19fc1d3742ccba2d8dde5d69c5593e1a0b83fefa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Feb 2008 06:28:01 +0000 Subject: [PATCH] Fix an incredibly subtle bug exposed by Ted's change to APInt profiling. AddNodeIDNode does profiling for a ConstantSDNode, but so does SelectionDAG::getConstant. This profiling should be moved to a common static function in ConstantSDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47359 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index f904fa16d58..eb3729c813f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -361,7 +361,7 @@ static void AddNodeIDNode(FoldingSetNodeID &ID, SDNode *N) { default: break; // Normal nodes don't need extra info. case ISD::TargetConstant: case ISD::Constant: - ID.AddInteger(cast(N)->getValue()); + ID.Add(cast(N)->getAPIntValue()); break; case ISD::TargetConstantFP: case ISD::ConstantFP: { -- 2.34.1