Lines Matching defs:Mul
461 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(this);
462 if (!Mul) return false;
465 const SCEVConstant *SC = dyn_cast<SCEVConstant>(Mul->getOperand(0));
2257 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[i]);
2258 if (Mul && isa<SCEVConstant>(Mul->getOperand(0))) {
2260 Scale * cast<SCEVConstant>(Mul->getOperand(0))->getAPInt();
2261 if (Mul->getNumOperands() == 2 && isa<SCEVAddExpr>(Mul->getOperand(1))) {
2263 const SCEVAddExpr *Add = cast<SCEVAddExpr>(Mul->getOperand(1));
2270 SmallVector<const SCEV *, 4> MulOps(drop_begin(Mul->operands()));
2314 case Instruction::Mul:
2339 if (BinOp == Instruction::Mul)
2394 OBO->getOpcode() != Instruction::Mul)
2461 return Instruction::Mul;
2584 const SCEV *Mul = getMulExpr(Scale, Ops[i], SCEV::FlagAnyWrap, Depth + 1);
2586 return Mul;
2587 Ops[i] = Mul;
2606 if (const auto *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) {
2607 const auto *LastOp = Mul->getOperand(Mul->getNumOperands() - 1);
2701 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[0]);
2702 if (Mul && Mul->getNumOperands() == 2 &&
2703 Mul->getOperand(0)->isAllOnesValue()) {
2706 if (matchURem(Mul->getOperand(1), X, Y) && X == Ops[1]) {
2793 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(Ops[Idx]);
2794 for (unsigned MulOp = 0, e = Mul->getNumOperands(); MulOp != e; ++MulOp) {
2795 const SCEV *MulOpSCEV = Mul->getOperand(MulOp);
2801 const SCEV *InnerMul = Mul->getOperand(MulOp == 0);
2802 if (Mul->getNumOperands() != 2) {
2806 Mul->operands().take_front(MulOp));
2807 append_range(MulOps, Mul->operands().drop_front(MulOp + 1));
2837 const SCEV *InnerMul1 = Mul->getOperand(MulOp == 0);
2838 if (Mul->getNumOperands() != 2) {
2840 Mul->operands().take_front(MulOp));
2841 append_range(MulOps, Mul->operands().drop_front(MulOp+1));
3163 SCEVMulExpr *Mul = static_cast<SCEVMulExpr *>(S);
3164 if (Mul->getNoWrapFlags(OrigFlags) != OrigFlags)
3165 Mul->setNoWrapFlags(ComputeFlags(Ops));
3194 const SCEV *Mul = getMulExpr(Ops[0], AddOp, SCEV::FlagAnyWrap,
3196 if (!isa<SCEVMulExpr>(Mul)) AnyFolded = true;
3197 NewOps.push_back(Mul);
3233 while (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) {
3239 append_range(Ops, Mul->operands());
3289 Instruction::Mul, getSignedRange(Scale),
3600 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(LHS);
3601 if (!Mul || !Mul->hasNoUnsignedWrap())
3607 if (const auto *LHSCst = dyn_cast<SCEVConstant>(Mul->getOperand(0))) {
3609 SmallVector<const SCEV *, 2> Operands(drop_begin(Mul->operands()));
3624 append_range(Operands, Mul->operands().drop_front());
3627 Mul = dyn_cast<SCEVMulExpr>(LHS);
3628 if (!Mul)
3634 for (int i = 0, e = Mul->getNumOperands(); i != e; ++i) {
3635 if (Mul->getOperand(i) == RHS) {
3637 append_range(Operands, Mul->operands().take_front(i));
3638 append_range(Operands, Mul->operands().drop_front(i + 1));
5284 case Instruction::Mul:
5341 if (BinOp == Instruction::Mul || !isOverflowIntrinsicNoWrap(WO, DT))
6708 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(S);
6709 ConstantRange X = getRangeRef(Mul->getOperand(0), SignHint, Depth + 1);
6710 for (unsigned i = 1, e = Mul->getNumOperands(); i != e; ++i)
6711 X = X.multiply(getRangeRef(Mul->getOperand(i), SignHint, Depth + 1));
6712 return setRange(Mul, SignHint,
7501 case Instruction::Mul: {
7504 // get{Add,Mul}Expr calls.
7519 (BO->Opcode == Instruction::Mul &&
7520 NewBO->Opcode != Instruction::Mul)) {
7740 case Instruction::Mul: {
7761 if (!NewBO || NewBO->Opcode != Instruction::Mul) {
7997 APInt Mul = APInt::getOneBitSet(BitWidth - AShrAmt,
8000 getMulExpr(AddTruncateExpr, getConstant(Mul));
15063 const auto *Mul = dyn_cast<SCEVMulExpr>(Add->getOperand(0));
15065 if (Mul == nullptr)
15079 if (Mul->getNumOperands() == 3 && isa<SCEVConstant>(Mul->getOperand(0)))
15080 return MatchURemWithDivisor(Mul->getOperand(1)) ||
15081 MatchURemWithDivisor(Mul->getOperand(2));
15084 if (Mul->getNumOperands() == 2)
15085 return MatchURemWithDivisor(Mul->getOperand(1)) ||
15086 MatchURemWithDivisor(Mul->getOperand(0)) ||
15087 MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(1))) ||
15088 MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(0)));
15294 if (auto *Mul = dyn_cast<SCEVMulExpr>(Expr)) {
15295 if (Mul->getNumOperands() != 2)
15297 auto *MulLHS = Mul->getOperand(0);
15298 auto *MulRHS = Mul->getOperand(1);