Fix a bug in ReplaceAllUsesWith

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-08-28 23:59:36 +00:00
parent c8a89a1fcb
commit ff01698ec0

View File

@ -2084,7 +2084,7 @@ void SelectionDAG::ReplaceAllUsesWith(SDNode *From,
const std::vector<SDOperand> &To) {
assert(From->getNumValues() == To.size() &&
"Incorrect number of values to replace with!");
if (To.size() == 1) {
if (To.size() == 1 && To[0].Val->getNumValues() == 1) {
// Degenerate case handled above.
ReplaceAllUsesWith(SDOperand(From, 0), To[0]);
return;