Lines Matching refs:Rem
76 void eliminateIVRemainder(BinaryOperator *Rem, Value *IVOperand,
270 void SimplifyIndvar::eliminateIVRemainder(BinaryOperator *Rem, in eliminateIVRemainder() argument
275 if (IVOperand != Rem->getOperand(0)) in eliminateIVRemainder()
279 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
280 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
283 const Loop *ICmpLoop = LI->getLoopFor(Rem->getParent()); in eliminateIVRemainder()
291 Rem->replaceAllUsesWith(Rem->getOperand(0)); in eliminateIVRemainder()
303 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ, in eliminateIVRemainder()
304 Rem->getOperand(0), Rem->getOperand(1)); in eliminateIVRemainder()
307 ConstantInt::get(Rem->getType(), 0), in eliminateIVRemainder()
308 Rem->getOperand(0), "tmp", Rem); in eliminateIVRemainder()
309 Rem->replaceAllUsesWith(Sel); in eliminateIVRemainder()
312 DEBUG(dbgs() << "INDVARS: Simplified rem: " << *Rem << '\n'); in eliminateIVRemainder()
315 DeadInsts.emplace_back(Rem); in eliminateIVRemainder()
429 if (BinaryOperator *Rem = dyn_cast<BinaryOperator>(UseInst)) { in eliminateIVUser() local
430 bool IsSigned = Rem->getOpcode() == Instruction::SRem; in eliminateIVUser()
431 if (IsSigned || Rem->getOpcode() == Instruction::URem) { in eliminateIVUser()
432 eliminateIVRemainder(Rem, IVOperand, IsSigned); in eliminateIVUser()