Don't leave newly created nodes around if it turns out they are not needed.

llvm-svn: 45186
This commit is contained in:
Evan Cheng 2007-12-19 01:34:38 +00:00
parent f4c38c9289
commit 9f06e5e2df
1 changed files with 4 additions and 2 deletions

View File

@ -1446,7 +1446,8 @@ bool DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N,
TLI.isOperationLegal(LoOpt.getOpcode(), LoOpt.getValueType())) {
RetVal = true;
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), LoOpt);
}
} else
DAG.DeleteNode(Lo.Val);
}
if (HiExists) {
@ -1457,7 +1458,8 @@ bool DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N,
TLI.isOperationLegal(HiOpt.getOpcode(), HiOpt.getValueType())) {
RetVal = true;
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), HiOpt);
}
} else
DAG.DeleteNode(Hi.Val);
}
return RetVal;