Home | History | Annotate | Download | only in Utils

Lines Matching refs:ICmp

73     void eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand);
151 void SimplifyIndvar::eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand) {
153 ICmpInst::Predicate Pred = ICmp->getPredicate();
154 if (IVOperand != ICmp->getOperand(0)) {
156 assert(IVOperand == ICmp->getOperand(1) && "Can't find IVOperand");
161 // Get the SCEVs for the ICmp operands.
162 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx));
163 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx));
166 const Loop *ICmpLoop = LI->getLoopFor(ICmp->getParent());
173 ICmp->replaceAllUsesWith(ConstantInt::getTrue(ICmp->getContext()));
175 ICmp->replaceAllUsesWith(ConstantInt::getFalse(ICmp->getContext()));
179 DEBUG(dbgs() << "INDVARS: Eliminated comparison: " << *ICmp << '\n');
182 DeadInsts.push_back(ICmp);
195 // Get the SCEVs for the ICmp operands.
221 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ,
224 SelectInst::Create(ICmp,
241 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) {
242 eliminateIVComparison(ICmp, IVOperand);