From: Chris Lattner Date: Sun, 28 Aug 2005 23:59:36 +0000 (+0000) Subject: Fix a bug in ReplaceAllUsesWith X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ff01698ec037050fd9452d3b3486de568024ee72;p=oota-llvm.git Fix a bug in ReplaceAllUsesWith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23122 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 43163151049..b47002f1165 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2084,7 +2084,7 @@ void SelectionDAG::ReplaceAllUsesWith(SDNode *From, const std::vector &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;