mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Simplify some getNode calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52604 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f1d3108e4
commit
5686752099
@ -1058,8 +1058,7 @@ SDOperand DAGCombiner::visitADDC(SDNode *N) {
|
||||
|
||||
// canonicalize constant to RHS.
|
||||
if (N0C && !N1C) {
|
||||
SDOperand Ops[] = { N1, N0 };
|
||||
return DAG.getNode(ISD::ADDC, N->getVTList(), Ops, 2);
|
||||
return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0);
|
||||
}
|
||||
|
||||
// fold (addc x, 0) -> x + no carry out
|
||||
@ -1095,14 +1094,12 @@ SDOperand DAGCombiner::visitADDE(SDNode *N) {
|
||||
|
||||
// canonicalize constant to RHS
|
||||
if (N0C && !N1C) {
|
||||
SDOperand Ops[] = { N1, N0, CarryIn };
|
||||
return DAG.getNode(ISD::ADDE, N->getVTList(), Ops, 3);
|
||||
return DAG.getNode(ISD::ADDE, N->getVTList(), N1, N0, CarryIn);
|
||||
}
|
||||
|
||||
// fold (adde x, y, false) -> (addc x, y)
|
||||
if (CarryIn.getOpcode() == ISD::CARRY_FALSE) {
|
||||
SDOperand Ops[] = { N1, N0 };
|
||||
return DAG.getNode(ISD::ADDC, N->getVTList(), Ops, 2);
|
||||
return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0);
|
||||
}
|
||||
|
||||
return SDOperand();
|
||||
|
Loading…
x
Reference in New Issue
Block a user