Home | History | Annotate | Download | only in SelectionDAG

Lines Matching refs:SUB

1355   case ISD::SUB:                return visitSUB(N);
1472 case ISD::SUB:
1668 if (N0.getOpcode() == ISD::SUB)
1671 return DAG.getNode(ISD::SUB, DL, VT,
1681 if (N0.getOpcode() == ISD::SUB && isNullConstant(N0.getOperand(0)))
1682 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1, N0.getOperand(1));
1684 if (N1.getOpcode() == ISD::SUB && isNullConstant(N1.getOperand(0)))
1685 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N0, N1.getOperand(1));
1687 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1))
1690 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1))
1693 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD &&
1695 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0),
1698 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD &&
1700 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0),
1703 if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) &&
1704 N1.getOperand(0).getOpcode() == ISD::SUB &&
1710 if (N0.getOpcode() == ISD::SUB && N1.getOpcode() == ISD::SUB) {
1717 return DAG.getNode(ISD::SUB, SDLoc(N), VT,
1730 // fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n))
1731 if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB &&
1733 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N0,
1737 if (N0.getOpcode() == ISD::SHL && N0.getOperand(0).getOpcode() == ISD::SUB &&
1739 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1,
1749 // (add z, (and (sbbl x, x), 1)) -> (sub z, (sbbl x, x))
1753 return DAG.getNode(ISD::SUB, DL, VT, N->getOperand(0), AndOp0);
1757 // add (sext i1), X -> sub X, (zext i1)
1763 return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt);
1766 // add X, (sextinreg Y i1) -> sub X, (and Y 1)
1773 return DAG.getNode(ISD::SUB, DL, VT, N0, ZExt);
1862 // fold (sub x, 0) -> x, vector edition
1867 // fold (sub x, x) -> 0
1873 // fold (sub c1, c2) -> c1-c2
1874 return DAG.FoldConstantArithmetic(ISD::SUB, SDLoc(N), VT,
1879 // fold (sub x, c) -> (add x, -c)
1885 // Canonicalize (sub -1, x) -> ~x, i.e. (xor x, -1)
1889 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0))
1904 return DAG.getNode(ISD::SUB, DL, VT, NewC,
1909 (N0.getOperand(1).getOpcode() == ISD::SUB ||
1921 if (N0.getOpcode() == ISD::SUB &&
1922 N0.getOperand(1).getOpcode() == ISD::SUB &&
1924 return DAG.getNode(ISD::SUB, SDLoc(N), VT,
1927 // If either operand of a sub is undef, the result is undef
1936 // fold (sub Sym, c) -> Sym-c
1941 // fold (sub Sym+c1, Sym+c2) -> c1-c2
1948 // sub X, (sextinreg Y i1) -> add X, (and Y 1)
1968 // If the flag result is dead, turn this into an SUB.
1970 return CombineTo(N, DAG.getNode(ISD::SUB, DL, VT, N0, N1),
1982 // Canonicalize (sub -1, x) -> ~x, i.e. (xor x, -1) + no borrow
2058 return DAG.getNode(ISD::SUB, DL, VT,
2076 return DAG.getNode(ISD::SUB, DL, VT,
2244 return DAG.getNode(ISD::SUB, DL, VT,
2293 return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), SRA);
2447 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, Mul);
2449 return Sub;
3920 // EltSize == 32, using [A] would allow a Neg of the form (sub 64, Pos)
3921 // as well as (sub 32, Pos), but:
3923 // (or (shift1 X, (sub 64, Pos)), (shift2 X, Pos))
3938 // Check whether Neg has the form (sub NegC, NegOp1) for some NegC and NegOp1.
3939 if (Neg.getOpcode() != ISD::SUB)
4000 // (srl x, (*ext (sub 32, y)))) ->
4001 // (rotl x, y) or (rotr x, (sub 32, y))
4003 // fold (or (shl x, (*ext (sub 32, y))),
4005 // (rotr x, y) or (rotl x, (sub 32, y))
4546 // fold (shl (srl x, c1), c2) -> (and (shl x, (sub c2, c1), MASK) or
4547 // (and (srl x, (sub c1, c2), MASK)
4671 // fold (sra (shl X, m), (sub result_size, n))
4672 // -> (sign_extend (trunc (shl X, (sub (sub result_size, n), m)))) for
5643 N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1))
5646 N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1))
6343 // possibly over several sub-vectors.
9639 } else if (N->getOpcode() == ISD::SUB) {
9687 // If the pointer is not an add/sub, or if it doesn't have multiple uses, bail
9689 if ((Ptr.getOpcode() != ISD::ADD && Ptr.getOpcode() != ISD::SUB) ||
9756 Use.getUser()->getOpcode() != ISD::SUB) {
9850 X0 = (OtherUses[i]->getOpcode() == ISD::SUB && OffsetIdx == 1) ? -1 : 1;
9851 Y0 = (OtherUses[i]->getOpcode() == ISD::SUB && OffsetIdx == 0) ? -1 : 1;
9855 unsigned Opcode = (Y0 * Y1 < 0) ? ISD::SUB : ISD::ADD;
9882 /// Try to combine a load/store with a add/sub of the base pointer node into a
9919 (Op->getOpcode() != ISD::ADD && Op->getOpcode() != ISD::SUB))
9948 if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB){
10022 (AM == ISD::PRE_INC || AM == ISD::POST_INC ? ISD::ADD : ISD::SUB);
10062 // the indexing into an add/sub directly (that TargetConstant may not be
10454 // explicitly share a common sub class.
13304 // Now recurse on both the base and sub vectors.
13866 // sub elements and checking to see if each is
13890 // Extract the sub element from the constant bit mask.
14255 // (select_cc setlt X, 0, A, 0) -> (and (sra X, (sub size(X), 1), A)
14381 N0 == N2 && N3.getOpcode() == ISD::SUB && N0 == N3.getOperand(1))
14385 N0 == N3 && N2.getOpcode() == ISD::SUB && N0 == N2.getOperand(1))