forked from OSchip/llvm-project
Don't leave newly created nodes around if it turns out they are not needed.
llvm-svn: 45186
This commit is contained in:
parent
f4c38c9289
commit
9f06e5e2df
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue