diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-12-03 05:15:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-12-03 05:15:35 +0000 |
commit | 9f0d4e631d73659e8a94495b9a6d5ecbb6ad68a1 (patch) | |
tree | 9be3b495391295f1c0d8e38192b7d81f1f91bdf5 | |
parent | c9f2027adb6f700b0a2822cd9bee1d2623b0c9e5 (diff) | |
download | external_llvm-9f0d4e631d73659e8a94495b9a6d5ecbb6ad68a1.zip external_llvm-9f0d4e631d73659e8a94495b9a6d5ecbb6ad68a1.tar.gz external_llvm-9f0d4e631d73659e8a94495b9a6d5ecbb6ad68a1.tar.bz2 |
Don't call getValueType() on a null SDValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90415 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 06ffdd6..64331b0 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -546,7 +546,8 @@ SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo, To[0].getNode()->dump(&DAG); errs() << " and " << NumTo-1 << " other values\n"; for (unsigned i = 0, e = NumTo; i != e; ++i) - assert(N->getValueType(i) == To[i].getValueType() && + 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, &DeadNodes); |