summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-20 06:28:01 +0000
committerChris Lattner <sabre@nondot.org>2008-02-20 06:28:01 +0000
commit2a8037b5f536ae3ec9f69be63599f65a471f9846 (patch)
treeda39bd07998f6052b523fd9edad493a3959746b8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent59cc15955f4638520b3c9b3acfda7f66837d5168 (diff)
downloadbcm5719-llvm-2a8037b5f536ae3ec9f69be63599f65a471f9846.tar.gz
bcm5719-llvm-2a8037b5f536ae3ec9f69be63599f65a471f9846.zip
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. llvm-svn: 47359
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index f904fa16d58..eb3729c813f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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<ConstantSDNode>(N)->getValue());
+ ID.Add(cast<ConstantSDNode>(N)->getAPIntValue());
break;
case ISD::TargetConstantFP:
case ISD::ConstantFP: {
OpenPOWER on IntegriCloud