std::cerr << "\nWith: "; To[0].Val->dump(&DAG);
std::cerr << " and " << To.size()-1 << " other values\n");
std::vector<SDNode*> NowDead;
- DAG.ReplaceAllUsesWith(N, To, &NowDead);
+ DAG.ReplaceAllUsesWith(N, &To[0], &NowDead);
// Push the new nodes and any users onto the worklist
for (unsigned i = 0, e = To.size(); i != e; ++i) {
std::cerr << "\nWith: "; RV.Val->dump(&DAG);
std::cerr << '\n');
std::vector<SDNode*> NowDead;
- DAG.ReplaceAllUsesWith(N, std::vector<SDOperand>(1, RV), &NowDead);
+ SDOperand OpV = RV;
+ DAG.ReplaceAllUsesWith(N, &OpV, &NowDead);
// Push the new node and any users onto the worklist
WorkList.push_back(RV.Val);
/// This version can replace From with any result values. To must match the
/// number and types of values returned by From.
void SelectionDAG::ReplaceAllUsesWith(SDNode *From,
- const std::vector<SDOperand> &To,
+ const SDOperand *To,
std::vector<SDNode*> *Deleted) {
- assert(From->getNumValues() == To.size() &&
- "Incorrect number of values to replace with!");
- if (To.size() == 1 && To[0].Val->getNumValues() == 1) {
+ if (From->getNumValues() == 1 && To[0].Val->getNumValues() == 1) {
// Degenerate case handled above.
ReplaceAllUsesWith(SDOperand(From, 0), To[0], Deleted);
return;