Home | History | Annotate | Download | only in SelectionDAG

Lines Matching refs:c2

535       // reassoc. (op (op x, c1), c2) -> (op x, (op c1, c2))
553 // reassoc. (op c2, (op x, c1)) -> (op x, (op c1, c2))
1301 // fold (add (shl (add x, c1), c2), ) -> (add (add (shl x, c2), c1<<c2), )
1331 // fold (add c1, c2) -> c1+c2
1347 // fold ((c1-A)+c2) -> (c1+c2)-A
1423 // fold (add (shl (add x, c1), c2), ) -> (add (add (shl x, c2), c1<<c2), )
1583 // fold (sub c1, c2) -> c1-c2
1602 // fold C2-(A+C1) -> (C2-C1)-A
1642 // fold (sub Sym+c1, Sym+c2) -> c1-c2
1668 // fold (mul c1, c2) -> c1*c2
1697 // (mul (shl X, c1), c2) -> (mul X, c2 << c1)
1729 // fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
1759 // fold (sdiv c1, c2) -> c1/c2
1846 // fold (udiv c1, c2) -> c1/c2
1892 // fold (srem c1, c2) -> c1%c2
1934 // fold (urem c1, c2) -> c1%c2
2172 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1)))
2173 if (C2->getAPIntValue() == 2)
2182 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1)))
2183 if (C2->getAPIntValue() == 2)
2278 // fold (and c1, c2) -> c1&c2
2752 // fold (or c1, c2) -> c1|c2
2780 // Canonicalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2)
2781 // iff (c1 & c2) == 0.
2838 // (or (and X, C1), (and Y, C2)) -> (and (or X, Y), C3) if possible.
2845 // We can only do this xform if we know that bits from X that are set in C2
2934 // fold (or (shl x, C1), (srl x, C2)) -> (rotl x, C1)
2935 // fold (or (shl x, C1), (srl x, C2)) -> (rotr x, C2)
3074 // fold (xor c1, c2) -> c1^c2
3142 // fold (xor (xor x, c1), c2) -> (xor x, (xor c1, c2))
3251 // fold (shl c1, c2) -> c1<<c2
3292 // fold (shl (shl x, c1), c2) -> 0 or (shl x, (add c1, c2))
3296 uint64_t c2 = N1C->getZExtValue();
3297 if (c1 + c2 >= OpSizeInBits)
3300 DAG.getConstant(c1 + c2, N1.getValueType()));
3303 // fold (shl (ext (shl x, c1)), c2) -> (ext (shl x, (add c1, c2)))
3315 uint64_t c2 = N1C->getZExtValue();
3318 if (c2 >= OpSizeInBits - InnerShiftSize) {
3319 if (c1 + c2 >= OpSizeInBits)
3324 DAG.getConstant(c1 + c2, N1.getValueType()));
3328 // fold (shl (srl x, c1), c2) -> (and (shl x, (sub c2, c1), MASK) or
3329 // (and (srl x, (sub c1, c2), MASK)
3334 uint64_t c2 = N1C->getZExtValue();
3338 if (c2 > c1) {
3339 Mask = Mask.shl(c2-c1);
3341 DAG.getConstant(c2-c1, N1.getValueType()));
3343 Mask = Mask.lshr(c1-c2);
3345 DAG.getConstant(c1-c2, N1.getValueType()));
3379 // fold (sra c1, c2) -> (sra c1, c2)
3408 // fold (sra (sra x, c1), c2) -> (sra x, (add c1, c2))
3475 // fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2))
3524 // fold (srl c1, c2) -> c1 >>u c2
3541 // fold (srl (srl x, c1), c2) -> 0 or (srl x, (add c1, c2))
3545 uint64_t c2 = N1C->getZExtValue();
3546 if (c1 + c2 >= OpSizeInBits)
3549 DAG.getConstant(c1 + c2, N1.getValueType()));
3552 // fold (srl (trunc (srl x, c1)), c2) -> 0 or (trunc (srl x, (add c1, c2)))
3558 uint64_t c2 = N1C->getZExtValue();
3564 if (c1 + c2 >= InnerShiftSize)
3569 DAG.getConstant(c1 + c2, ShiftCountVT)));
3714 // fold (ctlz c1) -> c2
3724 // fold (cttz c1) -> c2
3734 // fold (ctpop c1) -> c2
5247 // fold (fadd c1, c2) -> (fadd c1, c2)
5265 // If allowed, fold (fadd (fadd x, c1), c2) -> (fadd x, (fadd c1, c2))
5288 // fold (fsub c1, c2) -> c1-c2
5322 // fold (fmul c1, c2) -> c1*c2
5354 // If allowed, fold (fmul (fmul x, c1), c2) -> (fmul x, (fmul c1, c2))
5377 // fold (fdiv c1, c2) -> c1/c2
5404 // fold (frem c1, c2) -> fmod(c1,c2)
5764 // will convert it back to (X & C1) >> C2.
7489 // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a