mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
[SDAG] Add an assert that we don't mess up the number of values when
replacing nodes in the legalizer. This caught a number of bugs for me during development. llvm-svn: 214022
This commit is contained in:
parent
1f587b7386
commit
f6b8e0a095
@ -180,6 +180,9 @@ public:
|
||||
}
|
||||
}
|
||||
void ReplaceNode(SDNode *Old, SDNode *New) {
|
||||
assert(Old->getNumValues() == New->getNumValues() &&
|
||||
"Replacing one node with another that produces a different number "
|
||||
"of values!");
|
||||
DAG.ReplaceAllUsesWith(Old, New);
|
||||
for (unsigned i = 0, e = Old->getNumValues(); i != e; ++i)
|
||||
DAG.TransferDbgValues(SDValue(Old, i), SDValue(New, i));
|
||||
|
Loading…
Reference in New Issue
Block a user