Lines Matching refs:Cmp
311 static bool processICmp(ICmpInst *Cmp, LazyValueInfo *LVI) { in processICmp() argument
316 if (Cmp->getType()->isVectorTy() || in processICmp()
317 !Cmp->getOperand(0)->getType()->isIntegerTy()) in processICmp()
320 if (!Cmp->isSigned()) in processICmp()
325 Cmp->getPredicate(), LVI->getConstantRange(Cmp->getOperand(0), Cmp), in processICmp()
326 LVI->getConstantRange(Cmp->getOperand(1), Cmp)); in processICmp()
332 Cmp->setPredicate(UnsignedPred); in processICmp()
341 static bool constantFoldCmp(CmpInst *Cmp, LazyValueInfo *LVI) { in constantFoldCmp() argument
342 Value *Op0 = Cmp->getOperand(0); in constantFoldCmp()
343 auto *C = dyn_cast<Constant>(Cmp->getOperand(1)); in constantFoldCmp()
348 LVI->getPredicateAt(Cmp->getPredicate(), Op0, C, Cmp, in constantFoldCmp()
354 Constant *TorF = ConstantInt::get(Type::getInt1Ty(Cmp->getContext()), Result); in constantFoldCmp()
355 Cmp->replaceAllUsesWith(TorF); in constantFoldCmp()
356 Cmp->eraseFromParent(); in constantFoldCmp()
360 static bool processCmp(CmpInst *Cmp, LazyValueInfo *LVI) { in processCmp() argument
361 if (constantFoldCmp(Cmp, LVI)) in processCmp()
364 if (auto *ICmp = dyn_cast<ICmpInst>(Cmp)) in processCmp()