diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-20 06:28:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-20 06:28:01 +0000 |
commit | 2a8037b5f536ae3ec9f69be63599f65a471f9846 (patch) | |
tree | da39bd07998f6052b523fd9edad493a3959746b8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 59cc15955f4638520b3c9b3acfda7f66837d5168 (diff) | |
download | bcm5719-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.cpp | 2 |
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: { |