Change comments so everybody can understand them, hopefully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen 2008-12-23 23:47:22 +00:00
parent 4c78e0286a
commit 7c7bc722ec

View File

@ -1025,7 +1025,7 @@ SDValue DAGCombiner::visitADD(SDNode *N) {
return DAG.getNode(ISD::SUB, VT, N1.getOperand(0), return DAG.getNode(ISD::SUB, VT, N1.getOperand(0),
N1.getOperand(1).getOperand(0)); N1.getOperand(1).getOperand(0));
} }
// fold (A+((B-A)+-C)) to (B+-C) // fold (A+((B-A)+or-C)) to (B+or-C)
if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) && if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) &&
N1.getOperand(0).getOpcode() == ISD::SUB && N1.getOperand(0).getOpcode() == ISD::SUB &&
N0 == N1.getOperand(0).getOperand(1)) { N0 == N1.getOperand(0).getOperand(1)) {
@ -1178,7 +1178,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
// fold (A+B)-B -> A // fold (A+B)-B -> A
if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1)
return N0.getOperand(0); return N0.getOperand(0);
// fold ((A+(B+-C))-B) -> A+-C // fold ((A+(B+or-C))-B) -> A+or-C
if (N0.getOpcode() == ISD::ADD && if (N0.getOpcode() == ISD::ADD &&
(N0.getOperand(1).getOpcode() == ISD::SUB || (N0.getOperand(1).getOpcode() == ISD::SUB ||
N0.getOperand(1).getOpcode() == ISD::ADD) && N0.getOperand(1).getOpcode() == ISD::ADD) &&