mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
Don't leave newly created nodes around if it turns out they are not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45186 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1446,7 +1446,8 @@ bool DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N,
|
|||||||
TLI.isOperationLegal(LoOpt.getOpcode(), LoOpt.getValueType())) {
|
TLI.isOperationLegal(LoOpt.getOpcode(), LoOpt.getValueType())) {
|
||||||
RetVal = true;
|
RetVal = true;
|
||||||
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), LoOpt);
|
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 0), LoOpt);
|
||||||
}
|
} else
|
||||||
|
DAG.DeleteNode(Lo.Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HiExists) {
|
if (HiExists) {
|
||||||
@@ -1457,7 +1458,8 @@ bool DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N,
|
|||||||
TLI.isOperationLegal(HiOpt.getOpcode(), HiOpt.getValueType())) {
|
TLI.isOperationLegal(HiOpt.getOpcode(), HiOpt.getValueType())) {
|
||||||
RetVal = true;
|
RetVal = true;
|
||||||
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), HiOpt);
|
DAG.ReplaceAllUsesOfValueWith(SDOperand(N, 1), HiOpt);
|
||||||
}
|
} else
|
||||||
|
DAG.DeleteNode(Hi.Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
|
Reference in New Issue
Block a user