diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2014-12-23 18:59:02 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2014-12-23 18:59:02 +0000 |
| commit | d38920891ed2a29bc8fed5f802e44106f1099fde (patch) | |
| tree | aea7986a1fb84c270b5aaeee3628fb16d6cc6995 /llvm/lib | |
| parent | 9b839f8ced37965da3de2c210a3cb6d86d3b0a4e (diff) | |
| download | bcm5719-llvm-d38920891ed2a29bc8fed5f802e44106f1099fde.tar.gz bcm5719-llvm-d38920891ed2a29bc8fed5f802e44106f1099fde.zip | |
Always assert in DAGCombine and not only when -debug is enabled
Right now in DAG Combine check the validity of the returned type
only when -debug is given on the command line. However usually
the test cases in the validation does not use -debug.
An Assert build should always check this.
llvm-svn: 224779
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 7a91aae2489..5134066688d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -787,11 +787,12 @@ SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo, N->dump(&DAG); dbgs() << "\nWith: "; To[0].getNode()->dump(&DAG); - dbgs() << " and " << NumTo-1 << " other values\n"; - for (unsigned i = 0, e = NumTo; i != e; ++i) - assert((!To[i].getNode() || - N->getValueType(i) == To[i].getValueType()) && - "Cannot combine value to value of different type!")); + dbgs() << " and " << NumTo-1 << " other values\n"); + for (unsigned i = 0, e = NumTo; i != e; ++i) + assert((!To[i].getNode() || + N->getValueType(i) == To[i].getValueType()) && + "Cannot combine value to value of different type!"); + WorklistRemover DeadNodes(*this); DAG.ReplaceAllUsesWith(N, To); if (AddTo) { |

