Don't call getValueType() on a null SDValue

llvm-svn: 90415
This commit is contained in:
Jakob Stoklund Olesen 2009-12-03 05:15:35 +00:00
parent 6048e7fdc0
commit 32042f9475
1 changed files with 2 additions and 1 deletions

View File

@ -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);