• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/

Lines Matching refs:CI

1850 Instruction *InstCombiner::visitCallInst(CallInst &CI) {
1853 if (!CI.use_empty())
1854 if (Value *V = SimplifyCall(&CI, SQ.getWithInstruction(&CI)))
1855 return replaceInstUsesWith(CI, V);
1857 if (isFreeCall(&CI, &TLI))
1858 return visitFree(CI);
1862 if (CI.getFunction()->doesNotThrow() && !CI.doesNotThrow()) {
1863 CI.setDoesNotThrow();
1864 return &CI;
1867 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI);
1868 if (!II) return visitCallBase(CI);
1890 return eraseInstFromFunction(CI);
1892 if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes))
1893 if (CI->getZExtValue() == 1) {
1911 Module *M = CI.getModule();
1916 Type *Tys[3] = { CI.getArgOperand(0)->getType(),
1917 CI.getArgOperand(1)->getType(),
1918 CI.getArgOperand(2)->getType() };
1919 CI.setCalledFunction(Intrinsic::getDeclaration(M, MemCpyID, Tys));
1927 return eraseInstFromFunction(CI);
1971 return replaceInstUsesWith(CI, V);
1989 return replaceInstUsesWith(CI, SimplifiedMaskedOp);
2008 return BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
2080 return &CI;
2090 return &CI;
2095 if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
2124 if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
2158 if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
2241 if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
2351 if (Instruction *I = canonicalizeConstantArg0ToArg1(CI))
2561 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), 0));
2568 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), Result));
2582 return replaceInstUsesWith(CI, II->getArgOperand(0));
2584 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), 0));
2589 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), Result));
2598 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), 0));
2600 return replaceInstUsesWith(CI, II->getArgOperand(0));
2619 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), Result));
2627 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), 0));
2629 return replaceInstUsesWith(CI, II->getArgOperand(0));
2648 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), Result));
3196 return replaceInstUsesWith(CI, Op0);
3200 return replaceInstUsesWith(CI, Op0);
3359 return CastInst::Create(Instruction::BitCast, Result, CI.getType());
3410 return replaceInstUsesWith(CI, ConstantAggregateZero::get(II->getType()));
3422 return replaceInstUsesWith(CI, ConstantExpr::getMul(CV0, CV1));
3467 if (auto *CI = dyn_cast<ConstantInt>(XorMask)) {
3468 if (CI->getValue().trunc(16).isAllOnesValue()) {
3518 return replaceInstUsesWith(CI, QNaN);
3533 return replaceInstUsesWith(CI, ConstantFP::get(II->getContext(), Val));
3545 return replaceInstUsesWith(CI, QNaN);
3559 return replaceInstUsesWith(CI, ConstantFP::get(II->getContext(),
3567 return replaceInstUsesWith(CI, ConstantInt::get(II->getType(), Exp));
3571 return replaceInstUsesWith(CI, UndefValue::get(II->getType()));
4031 return eraseInstFromFunction(CI);
4165 return eraseInstFromFunction(CI);
4184 return eraseInstFromFunction(CI);
4205 return eraseInstFromFunction(CI);
4228 return eraseInstFromFunction(CI);
4391 const CastInst *const CI,
4393 if (!CI->isLosslessCast())
4412 cast<PointerType>(CI->getOperand(0)->getType())->getElementType();
4415 : cast<PointerType>(CI->getType())->getElementType();
4423 Instruction *InstCombiner::tryOptimizeCall(CallInst *CI) {
4424 if (!CI->getCalledFunction()) return nullptr;
4434 if (Value *With = Simplifier.optimizeCall(CI, Builder)) {
4436 return CI->use_empty() ? CI : replaceInstUsesWith(*CI, With);
4681 CastInst *CI = dyn_cast<CastInst>(*I);
4682 if (CI && isSafeToEliminateVarargsCast(Call, DL, CI, ix)) {
4683 replaceUse(*I, CI->getOperand(0));
4691 CI->getOperand(0)->getType()->getPointerElementType()));
4707 if (CallInst *CI = dyn_cast<CallInst>(&Call)) {
4708 Instruction *I = tryOptimizeCall(CI);