Lines Matching refs:Mul

461   const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(this);  in isNonConstantNegative()  local
462 if (!Mul) return false; in isNonConstantNegative()
465 const SCEVConstant *SC = dyn_cast<SCEVConstant>(Mul->getOperand(0)); in isNonConstantNegative()
2255 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[i]); in CollectAddOperandsWithScales() local
2256 if (Mul && isa<SCEVConstant>(Mul->getOperand(0))) { in CollectAddOperandsWithScales()
2258 Scale * cast<SCEVConstant>(Mul->getOperand(0))->getAPInt(); in CollectAddOperandsWithScales()
2259 if (Mul->getNumOperands() == 2 && isa<SCEVAddExpr>(Mul->getOperand(1))) { in CollectAddOperandsWithScales()
2261 const SCEVAddExpr *Add = cast<SCEVAddExpr>(Mul->getOperand(1)); in CollectAddOperandsWithScales()
2268 SmallVector<const SCEV *, 4> MulOps(drop_begin(Mul->operands())); in CollectAddOperandsWithScales()
2312 case Instruction::Mul: in willNotOverflow()
2337 if (BinOp == Instruction::Mul) in willNotOverflow()
2392 OBO->getOpcode() != Instruction::Mul) in getStrengthenedNoWrapFlagsFromBinOp()
2459 return Instruction::Mul; in StrengthenNoWrapFlags()
2582 const SCEV *Mul = getMulExpr(Scale, Ops[i], SCEV::FlagAnyWrap, Depth + 1); in getAddExpr() local
2584 return Mul; in getAddExpr()
2585 Ops[i] = Mul; in getAddExpr()
2604 if (const auto *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) { in getAddExpr() local
2605 const auto *LastOp = Mul->getOperand(Mul->getNumOperands() - 1); in getAddExpr()
2699 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[0]); in getAddExpr() local
2700 if (Mul && Mul->getNumOperands() == 2 && in getAddExpr()
2701 Mul->getOperand(0)->isAllOnesValue()) { in getAddExpr()
2704 if (matchURem(Mul->getOperand(1), X, Y) && X == Ops[1]) { in getAddExpr()
2791 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(Ops[Idx]); in getAddExpr() local
2792 for (unsigned MulOp = 0, e = Mul->getNumOperands(); MulOp != e; ++MulOp) { in getAddExpr()
2793 const SCEV *MulOpSCEV = Mul->getOperand(MulOp); in getAddExpr()
2799 const SCEV *InnerMul = Mul->getOperand(MulOp == 0); in getAddExpr()
2800 if (Mul->getNumOperands() != 2) { in getAddExpr()
2804 Mul->operands().take_front(MulOp)); in getAddExpr()
2805 append_range(MulOps, Mul->operands().drop_front(MulOp + 1)); in getAddExpr()
2835 const SCEV *InnerMul1 = Mul->getOperand(MulOp == 0); in getAddExpr()
2836 if (Mul->getNumOperands() != 2) { in getAddExpr()
2838 Mul->operands().take_front(MulOp)); in getAddExpr()
2839 append_range(MulOps, Mul->operands().drop_front(MulOp+1)); in getAddExpr()
3161 SCEVMulExpr *Mul = static_cast<SCEVMulExpr *>(S); in getMulExpr() local
3162 if (Mul->getNoWrapFlags(OrigFlags) != OrigFlags) in getMulExpr()
3163 Mul->setNoWrapFlags(ComputeFlags(Ops)); in getMulExpr()
3192 const SCEV *Mul = getMulExpr(Ops[0], AddOp, SCEV::FlagAnyWrap, in getMulExpr() local
3194 if (!isa<SCEVMulExpr>(Mul)) AnyFolded = true; in getMulExpr()
3195 NewOps.push_back(Mul); in getMulExpr()
3231 while (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) { in getMulExpr() local
3237 append_range(Ops, Mul->operands()); in getMulExpr()
3287 Instruction::Mul, getSignedRange(Scale), in getMulExpr()
3598 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(LHS); in getUDivExactExpr() local
3599 if (!Mul || !Mul->hasNoUnsignedWrap()) in getUDivExactExpr()
3605 if (const auto *LHSCst = dyn_cast<SCEVConstant>(Mul->getOperand(0))) { in getUDivExactExpr()
3607 SmallVector<const SCEV *, 2> Operands(drop_begin(Mul->operands())); in getUDivExactExpr()
3622 append_range(Operands, Mul->operands().drop_front()); in getUDivExactExpr()
3625 Mul = dyn_cast<SCEVMulExpr>(LHS); in getUDivExactExpr()
3626 if (!Mul) in getUDivExactExpr()
3632 for (int i = 0, e = Mul->getNumOperands(); i != e; ++i) { in getUDivExactExpr()
3633 if (Mul->getOperand(i) == RHS) { in getUDivExactExpr()
3635 append_range(Operands, Mul->operands().take_front(i)); in getUDivExactExpr()
3636 append_range(Operands, Mul->operands().drop_front(i + 1)); in getUDivExactExpr()
5279 case Instruction::Mul: in MatchBinaryOp()
5336 if (BinOp == Instruction::Mul || !isOverflowIntrinsicNoWrap(WO, DT)) in MatchBinaryOp()
6692 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(S); in getRangeRef() local
6693 ConstantRange X = getRangeRef(Mul->getOperand(0), SignHint, Depth + 1); in getRangeRef()
6694 for (unsigned i = 1, e = Mul->getNumOperands(); i != e; ++i) in getRangeRef()
6695 X = X.multiply(getRangeRef(Mul->getOperand(i), SignHint, Depth + 1)); in getRangeRef()
6696 return setRange(Mul, SignHint, in getRangeRef()
7485 case Instruction::Mul: { in getOperandsToCreate()
7503 (BO->Opcode == Instruction::Mul && in getOperandsToCreate()
7504 NewBO->Opcode != Instruction::Mul)) { in getOperandsToCreate()
7724 case Instruction::Mul: { in createSCEV()
7745 if (!NewBO || NewBO->Opcode != Instruction::Mul) { in createSCEV()
7981 APInt Mul = APInt::getOneBitSet(BitWidth - AShrAmt, in createSCEV() local
7984 getMulExpr(AddTruncateExpr, getConstant(Mul)); in createSCEV()
14885 const auto *Mul = dyn_cast<SCEVMulExpr>(Add->getOperand(0)); in matchURem() local
14887 if (Mul == nullptr) in matchURem()
14901 if (Mul->getNumOperands() == 3 && isa<SCEVConstant>(Mul->getOperand(0))) in matchURem()
14902 return MatchURemWithDivisor(Mul->getOperand(1)) || in matchURem()
14903 MatchURemWithDivisor(Mul->getOperand(2)); in matchURem()
14906 if (Mul->getNumOperands() == 2) in matchURem()
14907 return MatchURemWithDivisor(Mul->getOperand(1)) || in matchURem()
14908 MatchURemWithDivisor(Mul->getOperand(0)) || in matchURem()
14909 MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(1))) || in matchURem()
14910 MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(0))); in matchURem()
15204 if (auto *Mul = dyn_cast<SCEVMulExpr>(Expr)) { in applyLoopGuards() local
15205 if (Mul->getNumOperands() != 2) in applyLoopGuards()
15207 auto *MulLHS = Mul->getOperand(0); in applyLoopGuards()
15208 auto *MulRHS = Mul->getOperand(1); in applyLoopGuards()