aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/LegalizeTypes.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-10-28 09:38:36 +0000
committerDuncan Sands <baldrick@free.fr>2008-10-28 09:38:36 +0000
commit1acb29c8ead8b7a6ac5dd63720711d397ac25ad9 (patch)
tree3fff8f654cc9637998e07c786049aec509d1d610 /lib/CodeGen/SelectionDAG/LegalizeTypes.h
parent6e1c6231ba93ed7590c62ef0f94d0d9443b598ed (diff)
Fix a testcase provided by Bill in which the node
id could end up being wrong mostly because of forgetting to remap new nodes that morphed into processed nodes through CSE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypes.h')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/lib/CodeGen/SelectionDAG/LegalizeTypes.h
index 6f4c903af4..19aa2c6682 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.h
@@ -155,9 +155,11 @@ public:
/// ReanalyzeNode - Recompute the NodeID and correct processed operands
/// for the specified node, adding it to the worklist if ready.
- SDNode *ReanalyzeNode(SDNode *N) {
+ void ReanalyzeNode(SDNode *N) {
N->setNodeId(NewNode);
- return AnalyzeNewNode(N);
+ SDValue Val(N, 0);
+ AnalyzeNewNode(Val);
+ // The node may have changed but we don't care.
}
void NoteDeletion(SDNode *Old, SDNode *New) {
@@ -169,7 +171,6 @@ public:
private:
void AnalyzeNewNode(SDValue &Val);
- SDNode *AnalyzeNewNode(SDNode *N);
void ReplaceValueWith(SDValue From, SDValue To);
void ReplaceNodeWith(SDNode *From, SDNode *To);