Lines Matching defs:operands
173 cl::desc("Threshold for inlining multiplication operands into a SCEV"),
178 cl::desc("Threshold for inlining addition operands into a SCEV"),
348 for (const SCEV *Op : NAry->operands())
414 ArrayRef<const SCEV *> SCEV::operands() const {
424 return cast<SCEVCastExpr>(this)->operands();
433 return cast<SCEVNAryExpr>(this)->operands();
435 return cast<SCEVUDivExpr>(this)->operands();
584 /// operands in SCEV expressions. \p EqCache is a set of pairs of values that
656 // Compare the number of operands.
767 ArrayRef<const SCEV *> LOps = LHS->operands();
768 ArrayRef<const SCEV *> ROps = RHS->operands();
976 return evaluateAtIteration(operands(), It, SE);
1006 // We could be called with an integer-typed operands during SCEV rewrites.
1068 /// pointer-typed operands in the expression are SCEVUnknown.
1093 for (const auto *Op : Expr->operands()) {
1103 for (const auto *Op : Expr->operands()) {
1206 // If the input value is a chrec scev, truncate the chrec's operands.
1209 for (const SCEV *Op : AddRec->operands())
1342 SmallVector<const SCEV *, 4> DiffOps(SA->operands());
1616 // operands (often constants). This allows analysis of something like
1723 // For a negative step, we can extend the operands iff doing so only
1789 for (const auto *Op : SA->operands())
1822 for (const auto *Op : SM->operands())
1859 for (auto *Operand : MinMax->operands())
1870 for (auto *Operand : MinMax->operands())
1961 for (const auto *Op : SA->operands())
1990 // operands (often constants). This allows analysis of something like
2131 for (auto *Operand : MinMax->operands())
2197 // Force the cast to be folded into the operands of an addrec.
2200 for (const SCEV *Op : AR->operands())
2213 /// Process the given Ops list, which is a list of operands to be added under
2215 /// getAddRecExpr. As an example of what it does, given a sequence of operands
2244 // Iterate over the add operands. They are sorted, with constants first.
2266 Add->operands(), NewScale, SE);
2270 SmallVector<const SCEV *, 4> MulOps(drop_begin(Mul->operands()));
2421 // We're trying to construct a SCEV of type `Type' with `Ops' as operands and
2441 // If FlagNSW is true and all the operands are non-negative, infer FlagNUW.
2578 // Scan ahead to count how many equal operands there are.
2595 // Check for truncates. If all the operands are truncated from the same
2602 // as operands of the addrec then we bail and return nullptr here.
2616 // Check all the operands to see if they can be represented in the
2692 SmallVector<const SCEV *, 4> NewOps(AddExpr->operands());
2716 // If there are add operands they would be next.
2727 // If we have an add, expand the add operands onto the end of the operands
2730 append_range(Ops, Add->operands());
2735 // If we deleted at least one add, we added operands to the end of the list,
2737 // any operands we just acquired.
2747 // operands multiplied by constant values.
2762 // re-generate the operands list. Group the operands by constant scale,
2767 // Re-generate the operands list.
2803 // If the multiply has more than two operands, we must get the
2806 Mul->operands().take_front(MulOp));
2807 append_range(MulOps, Mul->operands().drop_front(MulOp + 1));
2840 Mul->operands().take_front(MulOp));
2841 append_range(MulOps, Mul->operands().drop_front(MulOp+1));
2847 OtherMul->operands().take_front(OMulOp));
2848 append_range(MulOps, OtherMul->operands().drop_front(OMulOp+1));
2866 // If there are any add recurrences in the operands list, see if any other
2874 // Scan all of the other operands to this add and add them to the vector if
2898 SmallVector<const SCEV *, 4> AddRecOps(AddRec->operands());
2925 // If all of the other operands were loop invariant, we are done.
2951 SmallVector<const SCEV *, 4> AddRecOps(AddRec->operands());
2959 append_range(AddRecOps, OtherAddRec->operands().drop_front(i));
3084 /// Determine if any of the operands in this SCEV are a constant or if
3189 // add operands.
3193 for (const SCEV *AddOp : Add->operands()) {
3204 for (const SCEV *AddRecOp : AddRec->operands())
3230 // If there are mul operands inline them all into this expression.
3236 // If we have an mul, expand the mul operands onto the end of the
3237 // operands list.
3239 append_range(Ops, Mul->operands());
3243 // If we deleted at least one mul, we added operands to the end of the
3245 // resimplify any operands we just acquired.
3250 // If there are any add recurrences in the operands list, see if any other
3258 // Scan all of the other operands to this mul and add them to the vector
3279 // b) all multiplications of addrec operands with scale are nsw.
3298 // If all of the other operands were loop invariant, we are done.
3334 // SCEVAddRecs with very complex operands.
3449 // Determine if the division can be folded into the operands of
3450 // its operands.
3473 for (const SCEV *Op : AR->operands())
3511 for (const SCEV *Op : M->operands())
3519 Operands = SmallVector<const SCEV *, 4>(M->operands());
3543 for (const SCEV *Op : A->operands())
3559 // Fold if both operands are constant.
3609 SmallVector<const SCEV *, 2> Operands(drop_begin(Mul->operands()));
3624 append_range(Operands, Mul->operands().drop_front());
3637 append_range(Operands, Mul->operands().take_front(i));
3638 append_range(Operands, Mul->operands().drop_front(i + 1));
3655 append_range(Operands, StepChrec->operands());
3701 SmallVector<const SCEV *, 4> NestedOperands(NestedAR->operands());
3703 // AddRecs require their operands be loop-invariant with respect to their
3912 // Check to see if one of the operands is of the same kind. If so, expand its
3913 // operands onto our operand list, and recurse to simplify.
3919 append_range(Ops, SMME->operands());
4006 bool Changed = visit(Kind, NAry->operands(), NewOps);
4244 // If the instruction can't create poison, we can recurse to its operands.
4248 for (Value *Op : I->operands())
4290 // Check to see if one of the operands is of the same kind. If so, expand its
4291 // operands onto our operand list, and recurse to simplify.
4302 Ops.insert(Ops.begin() + Idx, SMME->operands().begin(),
4303 SMME->operands().end());
4629 for (const SCEV *Operand : MME->operands()) {
4652 SmallVector<const SCEV *> Ops{AddRec->operands()};
4660 SmallVector<const SCEV *> Ops{Add->operands()};
4855 for (const SCEV *AddOp : Add->operands()) {
5381 // because one of the other operands of the SCEVAddExpr updating this PHI is
6192 "Unexpected operands of a select.");
6289 // The result is GCD of all operands results.
6326 for (const SCEV *Operand : M->operands().drop_front())
6332 // sum of trailing zeros for all its operands.
6334 for (const SCEV *Operand : M->operands())
6343 // Find the trailing bits, which is the minimum of its operands.
6345 for (const SCEV *Operand : N->operands().drop_front())
6579 // Build worklist by queuing operands of N-ary expressions and phi nodes.
6583 // If it is not a `SCEVUnknown`, just recurse into operands.
6585 for (const SCEV *Op : P->operands())
6593 for (auto &Op : reverse(P->operands()))
6600 // order. This will force ranges for earlier operands to be computed before
6733 // If there's no signed wrap, and all the operands except initial value have
6735 // 1: smaller than initial value if operands are non negative,
6736 // 2: bigger than initial value if operands are non positive.
6923 for (const auto &Op : Phi->operands()) {
7291 for (const auto *Op : S->operands())
7340 for (const Use &Op : I->operands()) {
7436 // Worklist item with a Value and a bool indicating whether all operands have
7452 // If all operands have been visited already, create the SCEV.
7456 // Otherwise get the operands we need to create SCEV's for before creating
7465 // Queue CurV for SCEV creation, followed by its's operands which need to
7588 for (Value *Index : U->operands())
7622 for (Value *Inc : U->operands())
7689 // The simple thing to do would be to just call getSCEV on both operands
7692 // because it leads to N-1 getAddExpr calls for N ultimate operands.
7693 // Instead, gather up all the operands and make a single getAddExpr call.
7694 // LLVM IR canonical form means we need only traverse the left operands.
7706 // instead of pushing the operands of the addition onto AddOps,
7709 // formed with operands from AddOps.
7821 append_range(MulOps, LHSMul->operands().drop_front());
8022 // A + (-1)*B. By pushing sign extension onto its operands we are much
8059 // If both operands are non-negative, this is just an udiv.
8066 // If both operands are non-negative, this is just an urem.
9156 // Simplify the operands before analyzing them.
9189 SmallVector<const SCEV*> Operands{AR->operands()};
9469 /// assuming that all operands were constants.
9483 /// assuming its operands can all constant evolve.
9494 // If we won't be able to constant fold this expression even if the operands
9508 // Otherwise, we can evaluate this instruction if all of its operands are
9511 for (Value *Op : UseInst->operands()) {
9541 /// way, but the operands of an operation must either be constants or a value
9829 for (const SCEV *Op : SA->operands()) {
9917 // Okay, at least one of these operands is loop variant but might be
9921 append_range(NewOps, AddRec->operands().take_front(i));
9964 ArrayRef<const SCEV *> Ops = V->operands();
9970 // Okay, at least one of these operands is loop variant but might be
9985 // If we got here, all operands are loop invariant.
10058 for (Value *Op : I->operands()) {
10064 // If any of the operands is non-constant and if they are
10680 // Check for both operands constant.
10686 // Otherwise swap the operands to put the constant on the right.
10694 // as both operands could be addrecs loop-invariant in each other's loop.
10782 // adding or subtracting 1 from one of the operands.
11153 for (auto *Op : UMin->operands())
11681 // operands fit into narrow unsigned range. If so, try to prove facts in
11768 // Forms 1. and 2. require swapping the operands of one condition. Don't
11801 // operands are non-negative or negative.
12311 return is_contained(MinMaxExpr->operands(), Candidate);
12445 // going to compare the operands to RHS, we should be certain that we don't
13363 SmallVector<const SCEV *, 4> Operands(operands());
13376 if (any_of(operands(), [](const SCEV *Op) { return !isa<SCEVConstant>(Op); }))
13879 // This recurrence is variant w.r.t. L if any of its operands
13881 for (const auto *Op : AR->operands())
13901 for (const auto *Op : S->operands()) {
13982 for (const SCEV *NAryOp : S->operands()) {
14326 for (const auto *Op : S.operands()) {
15033 // for URem with constant power-of-2 second operands.
15042 // for URem with constant power-of-2 second operands. Make sure the size of
15331 // Collect rewrites for LHS and its transitive operands based on the
15333 // For min/max expressions, also apply the guard to its operands:
15375 append_range(Worklist, S->operands());
15609 for (const auto *Op : Expr->operands()) {
15614 // We are only replacing operands with equivalent values, so transfer the
15625 for (const auto *Op : Expr->operands()) {
15630 // We are only replacing operands with equivalent values, so transfer the