diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-07-15 18:57:05 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-07-15 18:57:05 +0000 |
commit | 2f5e8e3d95db6441782dfa4c7afe216c80dd220d (patch) | |
tree | d45fb32fa76d5222fa9a8544275467eea7f9d114 /llvm/lib/CodeGen | |
parent | f35bbbcd87835f20ee4d861213454f69d85f46c4 (diff) | |
download | bcm5719-llvm-2f5e8e3d95db6441782dfa4c7afe216c80dd220d.tar.gz bcm5719-llvm-2f5e8e3d95db6441782dfa4c7afe216c80dd220d.zip |
Remove invalid assert in DAGTypeLegalizer::RemapValue
There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
which, in part, says:
// Note that these invariants may not hold momentarily when processing a node:
// the node being processed may be put in a map before being marked Processed.
Unfortunately, this assert would be valid only if the above-mentioned invariant
held unconditionally. This was causing llc to assert when, in fact,
everything was fine.
Thanks to Richard Sandiford for investigating this issue!
Fixes PR16562.
llvm-svn: 186338
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp index ef7966209e2..fd770d140b5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp @@ -615,7 +615,10 @@ void DAGTypeLegalizer::RemapValue(SDValue &N) { // replaced with other values. RemapValue(I->second); N = I->second; - assert(N.getNode()->getNodeId() != NewNode && "Mapped to new node!"); + + // Note that it is possible to have N.getNode()->getNodeId() == NewNode at + // this point because it is possible for a node to be put in the map before + // being processed. } } |