Lines Matching defs:DivInst

78   AssertingVH<Instruction> DivInst;
85 : DivInst(DivInst_), RemInst(RemInst_) {
86 assert((DivInst->getOpcode() == Instruction::UDiv ||
87 DivInst->getOpcode() == Instruction::SDiv) &&
89 assert(DivInst->getType() == RemInst->getType() && "Types should match.");
95 Type *getType() const { return DivInst->getType(); }
98 bool isSigned() const { return DivInst->getOpcode() == Instruction::SDiv; }
101 Value *getDividend() const { return DivInst->getOperand(0); }
102 Value *getDivisor() const { return DivInst->getOperand(1); }
196 auto &DivInst = E.DivInst;
233 if (HasDivRemOp && RemInst->getParent() == DivInst->getParent())
236 bool DivDominates = DT.dominates(DivInst, RemInst);
237 if (!DivDominates && !DT.dominates(RemInst, DivInst)) {
242 BasicBlock *DivBB = DivInst->getParent();
293 IsSafeToHoist(RemInst, RemBB) && IsSafeToHoist(DivInst, DivBB) &&
299 DivInst->moveBefore(PredBB->getTerminator()->getIterator());
318 RemInst->moveAfter(DivInst);
320 DivInst->moveAfter(RemInst);
334 Instruction *Mul = BinaryOperator::CreateMul(DivInst, Y);
368 DivInst->moveBefore(RemInst->getIterator());
374 // If DivInst has the exact flag, remove it. Otherwise this optimization
376 DivInst->dropPoisonGeneratingFlags();
387 if (!isGuaranteedNotToBeUndef(X, nullptr, DivInst, &DT)) {
389 new FreezeInst(X, X->getName() + ".frozen", DivInst->getIterator());
390 FrX->setDebugLoc(DivInst->getDebugLoc());
391 DivInst->setOperand(0, FrX);
396 if (!isGuaranteedNotToBeUndef(Y, nullptr, DivInst, &DT)) {
398 new FreezeInst(Y, Y->getName() + ".frozen", DivInst->getIterator());
399 FrY->setDebugLoc(DivInst->getDebugLoc());
400 DivInst->setOperand(1, FrY);