Lines Matching defs:Add
960 const SCEV *Add = getAddExpr(Start, ZMul);
965 if (getZeroExtendExpr(Add, WideTy) == OperandExtendedAdd) {
976 Add = getAddExpr(Start, SMul);
981 if (getZeroExtendExpr(Add, WideTy) == OperandExtendedAdd) {
1226 const SCEV *Add = getAddExpr(Start, SMul);
1231 if (getSignExtendExpr(Add, WideTy) == OperandExtendedAdd) {
1242 Add = getAddExpr(Start, UMul);
1247 if (getSignExtendExpr(Add, WideTy) == OperandExtendedAdd) {
1347 /// what it does, given a sequence of operands that would form an add
1356 /// and add 13 + A*B*29 to AccumulatedConstant.
1378 // Iterate over the add operands. They are sorted, with constants first.
1396 // A multiplication of a constant with another add; recurse.
1397 const SCEVAddExpr *Add = cast<SCEVAddExpr>(Mul->getOperand(1));
1400 Add->op_begin(), Add->getNumOperands(),
1444 /// getAddExpr - Get a canonical add expression, or something simpler if
1450 assert(!Ops.empty() && "Cannot get empty add!");
1583 // If there are add operands they would be next.
1586 while (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[Idx])) {
1587 // If we have an add, expand the add operands onto the end of the operands
1590 Ops.append(Add->op_begin(), Add->op_end());
1594 // If we deleted at least one add, we added operands to the end of the list,
1601 // Skip over the add expression until we get to a multiply.
1712 // If there are any add recurrences in the operands list, see if any other
1720 // Scan all of the other operands to this add and add them to the vector if
1742 // outer add and the inner addrec are guaranteed to have no overflow.
1750 // Otherwise, add the folded AddRec by the non-invariant parts.
1795 // Okay, it looks like we really DO need an add expr. Check to see if we
1886 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[1]))
1887 if (Add->getNumOperands() == 2 &&
1888 isa<SCEVConstant>(Add->getOperand(0)))
1889 return getAddExpr(getMulExpr(LHSC, Add->getOperand(0)),
1890 getMulExpr(LHSC, Add->getOperand(1)));
1912 // If we have a mul by -1 of an add, try distributing the -1 among the
1913 // add operands.
1915 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[1])) {
1918 for (SCEVAddRecExpr::op_iterator I = Add->op_begin(),
1919 E = Add->op_end(); I != E; ++I) {
1945 // Skip over the add expression until we get to a multiply.
1967 // If there are any add recurrences in the operands list, see if any other
1975 // Scan all of the other operands to this mul and add them to the vector if
2225 /// getAddRecExpr - Get an add recurrence expression for the specified loop.
2242 /// getAddRecExpr - Get an add recurrence expression for the specified loop.
2319 // Ok, both add recurrences are valid after the transformation.
3012 // If the value coming around the backedge is an add with the symbolic
3014 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(BEValue)) {
3017 unsigned FoundIndex = Add->getNumOperands();
3018 for (unsigned i = 0, e = Add->getNumOperands(); i != e; ++i)
3019 if (Add->getOperand(i) == SymbolicName)
3025 if (FoundIndex != Add->getNumOperands()) {
3026 // Create an add with everything but the specified operand.
3028 for (unsigned i = 0, e = Add->getNumOperands(); i != e; ++i)
3030 Ops.push_back(Add->getOperand(i));
3119 /// createNodeForGEP - Expand GEP instructions into add and multiply
3125 // Add expression, because the Instruction may be guarded by control flow
3143 // For a struct, add the member offset.
3147 // Add the field offset to the running total offset.
3150 // For an array, add the element offset, explicitly scaled.
3161 // Add the element offset to the running total offset.
3169 // Add
3278 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
3279 ConstantRange X = getUnsignedRange(Add->getOperand(0));
3280 for (unsigned i = 1, e = Add->getNumOperands(); i != e; ++i)
3281 X = X.add(getUnsignedRange(Add->getOperand(i)));
3282 return setUnsignedRange(Add, ConservativeResult.intersectWith(X));
3355 StartRange.add(MaxBECountRange.multiply(StepRange));
3365 if (ExtStartRange.add(ExtMaxBECountRange.multiply(ExtStepRange)) !=
3420 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
3421 ConstantRange X = getSignedRange(Add->getOperand(0));
3422 for (unsigned i = 1, e = Add->getNumOperands(); i != e; ++i)
3423 X = X.add(getSignedRange(Add->getOperand(i)));
3424 return setSignedRange(Add, ConservativeResult.intersectWith(X));
3507 StartRange.add(MaxBECountRange.multiply(StepRange));
3517 if (ExtStartRange.add(ExtMaxBECountRange.multiply(ExtStepRange)) !=
3580 case Instruction::Add: {
3591 if (Opcode != Instruction::Add && Opcode != Instruction::Sub)
3610 // See the Add code above.
3660 // X*4+1 which got turned into X*4|1. Handle this as an Add so loop
3670 // Build a plain add SCEV.
3672 // If the LHS of the add was an addrec and it has no-wrap flags,
3685 // If the RHS of the xor is a signbit, then this is just an add.
3686 // Instcombine turns add of signbit into xor as a strength reduction step.
3718 // using an add, which is equivalent, and re-apply the zext.
6059 // Add an adjustment to the difference between End and Start so that
6061 const SCEV *Add = getAddExpr(Diff, RoundUp);
6064 // Check Add for unsigned overflow.
6071 if (getZeroExtendExpr(Add, WideTy) != OperandExtendedAdd)
6075 return getUDivExpr(Add, Step);
6536 // Add recurrences are never invariant in the function-body (null loop).